From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnaxQ-0000i1-Ep for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:14:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnaxL-0002NE-Ry for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:14:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnaxL-0002Ms-KF for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:13:59 -0500 Message-ID: <4F1719E6.3050401@redhat.com> Date: Wed, 18 Jan 2012 12:13:42 -0700 From: Eric Blake MIME-Version: 1.0 References: <1326482122-12619-1-git-send-email-lcapitulino@redhat.com> <1326482122-12619-3-git-send-email-lcapitulino@redhat.com> <4F10A694.8030900@redhat.com> <20120116105140.GA7180@jl-vm1.vm.bytemark.co.uk> <4F14496F.8020500@redhat.com> <20120117105703.GG7180@jl-vm1.vm.bytemark.co.uk> In-Reply-To: <20120117105703.GG7180@jl-vm1.vm.bytemark.co.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigFC701C0F16A4EFBA75C004C2" Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: jcody@redhat.com, Luiz Capitulino , mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFC701C0F16A4EFBA75C004C2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/17/2012 03:57 AM, Jamie Lokier wrote: > You're right, but it looks like it may be removed in the next edition: >=20 > https://www.opengroup.org/austin/docs/austin_446.txt >=20 >> it was only pthread_atfork() which was removed. >=20 > I didn't think pthread_atfork() ever was async-signal-safe. >=20 >> That is, fork() is _required_ >> to be async-signal-safe (and usable from signal handlers), provided th= at >> the actions following the fork also follow safety rules. >=20 > Nonethless, Glibc fork() isn't async-signal-safe even if it should be: >=20 > http://sourceware.org/bugzilla/show_bug.cgi?id=3D4737 Thanks for the (depressing) pointers. You posted the link to the Austin Group meeting where fork() was discusses; here's a further link to the actual defect and resolution, which is that the next version of POSIX _will_ be removing fork() from the list of async-signal-safe functions, by replacing it with _Fork() which does _not_ call any of the pthread_atfork() handlers: http://austingroupbugs.net/view.php?id=3D62 You are right that the only reason that fork() is not signal-safe is because of pthread_atfork(), so I was almost right in my above characterization that pthread_atfork() was the culprit. Maybe we should start probing at configure time whether _Fork already exists, and if so, use it instead of fork(). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigFC701C0F16A4EFBA75C004C2 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.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPFxnmAAoJEKeha0olJ0Nq91UH/0ziTvOXJLuWgIb2RruPulEs +b3CcJ2GvoJ4Al+AY1DkzjdVCPNlo06y1olDgdc0OCFUryF/jWyuYJj3rgK+Z+fu tXF5OnZJFczsRUY2Q/kQehI7D6oJYk9Ob0wtH8L+bIH/sUAkKbpdBp0VJiAkx6jv ES/V3K+qtLkYETePHf9k/kZ0sM6nB0xUPgDpj/xRdeIAJ7FaBs1H2fnFxk2RSL3J 4MpJG3wxNrjxoiJ/+Q9KKJl0THDZ7l6edbMdWFWLVFgqgMwS54gQZqRIZWA5bEOu W1DJNUS+8nftAXj7aVe8tJebqMh3fEKth9vh2Mo3qFvVd1ifuS7H+wp9rNrHbZM= =wteD -----END PGP SIGNATURE----- --------------enigFC701C0F16A4EFBA75C004C2--