[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] audit needed for signal handlers
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] audit needed for signal handlers |
Date: |
Mon, 11 Nov 2013 18:47:14 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 11/11/2013 18:13, Peter Maydell ha scritto:
>> > 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.)
Yeah, I was convinced it was---I still cannot find a reason why SIGWINCH
needs to be handled synchronously.
resize_term is definitely not signal safe; the man page reflects
10-year-old (or more) signal handling lore: "While these functions are
intended to be used to support a signal handler (i.e., for SIGWINCH),
care should be taken to avoid invoking them in a context where malloc or
realloc may have been interrupted, since it uses those functions".
Calling malloc/realloc from a signal handler is taboo these days...
Paolo
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