linux: Print all siginfo structs on ChildSignal

I noticed this questionable loop that never loops in CL:1357700. Purely
guessing as to what it was supposed to do -- I have not tested this
codepath.

TEST=cargo check

Change-Id: I4560b80f080112a78adf440a663341f4fb0f1070
Reviewed-on: https://chromium-review.googlesource.com/1359010
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
This commit is contained in:
David Tolnay 2018-12-03 10:46:45 -08:00 committed by chrome-bot
parent 35bac991e6
commit f503276291

View file

@ -933,19 +933,16 @@ fn run_control(
}
Token::ChildSignal => {
// Print all available siginfo structs, then exit the loop.
loop {
let result = sigchld_fd.read().map_err(Error::SignalFd)?;
if let Some(siginfo) = result {
error!(
"child {} died: signo {}, status {}, code {}",
siginfo.ssi_pid,
siginfo.ssi_signo,
siginfo.ssi_status,
siginfo.ssi_code
);
}
break 'poll;
while let Some(siginfo) = sigchld_fd.read().map_err(Error::SignalFd)? {
error!(
"child {} died: signo {}, status {}, code {}",
siginfo.ssi_pid,
siginfo.ssi_signo,
siginfo.ssi_status,
siginfo.ssi_code
);
}
break 'poll;
}
Token::CheckAvailableMemory => {
// Acknowledge the timer.