From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfvCR-0008Kg-Ct for qemu-devel@nongnu.org; Mon, 11 Nov 2013 12:23:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfvCM-0007XC-Dp for qemu-devel@nongnu.org; Mon, 11 Nov 2013 12:22:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfvCM-0007Wb-4G for qemu-devel@nongnu.org; Mon, 11 Nov 2013 12:22:50 -0500 Message-ID: <52811265.5070803@redhat.com> Date: Mon, 11 Nov 2013 10:22:45 -0700 From: Eric Blake MIME-Version: 1.0 References: <52810AEA.5020806@redhat.com> <52810E6F.1010505@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cUShLRuCEs9DLK3mhN72db1utQqpw8KOG" Subject: Re: [Qemu-devel] audit needed for signal handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Paolo Bonzini Cc: "qemu-devel@nongnu.org" , Anthony Liguori This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cUShLRuCEs9DLK3mhN72db1utQqpw8KOG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/11/2013 10:13 AM, Peter Maydell wrote: > On 11 November 2013 17:05, Paolo Bonzini wrote: >> That said, aren't all signals in QEMU (except SIG_IPI) caught with >> signalfd and the handlers run synchronously in the iothread? >=20 > 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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cUShLRuCEs9DLK3mhN72db1utQqpw8KOG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSgRJlAAoJEKeha0olJ0NqZ2YH/RFCQvSRXfOwiQ62DwsxY8TR 31nORLWbdIwK4YPCAywO5Mif5qPlEWobhDXI8XIDdr+RY7I5G75DPKLLSuuzbe3j SVqaWamN1fNyjy9WbmXnD7vMdwR5vU8wZYIuI5UEY8tNktG3Q4ud9zWB6BFiAgi/ 4AedB9oR8/72DLNzvCTaXj6napKqVE+Ni1N7iSz1CXXJUFJwWCuQH6BuhVVAWulx D1ZRqpLjGtTTiTmlRCi9gEKfr25uaMP4vzOT/FKZx/5b/hph+vDsWqlrduk6hxP8 EoQvgFUhoZv/K7KDdieorbo+dur7H+NqP2itr2jbT/Ky8zG9UlhGa1cOhLVH1gY= =s8kC -----END PGP SIGNATURE----- --cUShLRuCEs9DLK3mhN72db1utQqpw8KOG--