On 11/11/2013 10:13 AM, Peter Maydell wrote:
> On 11 November 2013 17:05, Paolo Bonzini <pbonz...@redhat.com> wrote:
>> That said, aren't all signals in QEMU (except SIG_IPI) caught with
>> signalfd and the handlers run synchronously in the iothread?
> 
> Eric specifically points out one which is not.
> (I'm pretty sure that 'reinstall signal handler at
> end of signal handler' is ancient voodoo that we don't
> want either, incidentally.)

Reinstalling the signal handler is voodoo needed only for systems where
SA_RESETHAND is the default behavior of signal() (POSIX says that the
older signal() is implementation-defined whether it behaves like
SA_RESETHAND|SA_NODEFER [SysV] or SA_RESTART [BSD] - so it is already
mandatory to use sigaction() if you don't want to be bitten by the
difference in semantics; but if you can assume working sigaction(), then
don't use signal() or SA_RESETHAND in the first place, and you don't
need the reinstall voodoo in your handlers).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to