mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
signal: Ignore errors in signal handler
Closes alexcrichton/tokio-signal#3
This commit is contained in:
committed by
Carl Lerche
parent
e28c350e31
commit
635149e3ab
+3
-8
@@ -348,14 +348,9 @@ extern fn handler(signum: c_int,
|
||||
};
|
||||
|
||||
if !state.ready.swap(true, Ordering::SeqCst) {
|
||||
match (&(*GLOBAL_STATE).write).write(&[1]) {
|
||||
Ok(..) => {}
|
||||
Err(e) => {
|
||||
if e.kind() != io::ErrorKind::WouldBlock {
|
||||
panic!("bad error on write fd: {}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ignore errors here as we're not in a context that can panic,
|
||||
// and otherwise there's not much we can do.
|
||||
drop((&(*GLOBAL_STATE).write).write(&[1]));
|
||||
}
|
||||
|
||||
let fnptr = state.prev.sa_sigaction;
|
||||
|
||||
Reference in New Issue
Block a user