diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-04 11:26:37 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-04 14:39:28 +0200 |
commit | e8c2091d4c4dd78bb9b8618205a238b96c87045d (patch) | |
tree | d405300af3eb11fad1a2c37e2b1fcd16ab13f7d7 /COPYING | |
parent | de5f852f38d644edf995a810c34b4d24dbfbd740 (diff) | |
download | qemu-e8c2091d4c4dd78bb9b8618205a238b96c87045d.zip qemu-e8c2091d4c4dd78bb9b8618205a238b96c87045d.tar.gz qemu-e8c2091d4c4dd78bb9b8618205a238b96c87045d.tar.bz2 |
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>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions