From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vg9BN-0004ao-Mf for qemu-devel@nongnu.org; Tue, 12 Nov 2013 03:18:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vg9BH-0006qR-Mx for qemu-devel@nongnu.org; Tue, 12 Nov 2013 03:18:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vg9BH-0006qN-EY for qemu-devel@nongnu.org; Tue, 12 Nov 2013 03:18:39 -0500 Message-ID: <1384244312.1272.5.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 12 Nov 2013 09:18:32 +0100 In-Reply-To: <52811822.6040401@redhat.com> References: <52810AEA.5020806@redhat.com> <52810E6F.1010505@redhat.com> <52811822.6040401@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] audit needed for signal handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , "qemu-devel@nongnu.org" , Anthony Liguori On Mo, 2013-11-11 at 18:47 +0100, Paolo Bonzini wrote: > 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. There is zero need. And changing that is actually the correct fix IMHO: Just set a flag in the signal handler (i.e. no syscalls which then could corrupt errno), then handle it the next time we update the screen. cheers, Gerd