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