[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] audit needed for signal handlers
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] audit needed for signal handlers |
Date: |
Mon, 11 Nov 2013 10:22:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/11/2013 10:13 AM, Peter Maydell wrote:
> On 11 November 2013 17:05, Paolo Bonzini <address@hidden> 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
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] audit needed for signal handlers, Peter Maydell, 2013/11/11
Re: [Qemu-devel] audit needed for signal handlers, Max Filippov, 2013/11/11