Searched hist:e8c2091d (Results 1 – 1 of 1) sorted by relevance
/qemu/scripts/ |
H A D | checkpatch.pl | e8c2091d Tue Jul 04 09:26:37 GMT 2017 Paolo Bonzini <pbonzini@redhat.com> checkpatch: should not use signal except for SIG_DFL or SIG_IGN
Using signal to establish a signal handler is not portable; on SysV systems, the signal handler would be reset to SIG_DFL after delivery, while BSD preserves the signal handler. Daniel Berrange reported that (to complicate matters further) the signal system call has SysV behavior, but glibc signal() actually calls the sigaction system call to provide BSD behavior.
However, using signal() to set a signal's disposition to SIG_DFL or SIG_IGN is portable and is a relatively common occurrence in QEMU source code, so allow that.
Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|