From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kxi1D-000329-P5 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 08:01:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kxi1B-00031N-Tc for qemu-devel@nongnu.org; Wed, 05 Nov 2008 08:01:55 -0500 Received: from [199.232.76.173] (port=60950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kxi1B-00031F-Ln for qemu-devel@nongnu.org; Wed, 05 Nov 2008 08:01:53 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:51087) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kxi1B-0003Tm-JV for qemu-devel@nongnu.org; Wed, 05 Nov 2008 08:01:53 -0500 Message-ID: <4911993D.4030001@web.de> Date: Wed, 05 Nov 2008 14:01:49 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix alarm_timer race with select References: <490FFF23.5020704@web.de> <49105704.9070708@codemonkey.ws> <49105BE7.6030505@codemonkey.ws> <49108333.6080807@web.de> <20081105123650.GE13630@shareable.org> In-Reply-To: <20081105123650.GE13630@shareable.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC2195FAB0D9C931341B2A8C6" Sender: jan.kiszka@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC2195FAB0D9C931341B2A8C6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jamie Lokier wrote: > Jan Kiszka wrote: >> + if (pipe(fds) || fcntl(fds[0], F_SETFL, O_NONBLOCK) >> + || fcntl(fds[1], F_SETFL, O_NONBLOCK)) { >=20 > Is this a portable way to set O_NONBLOCK on all host platforms? > I'm under the impression you need to ues F_GETFL first, in case > other flags are important to the functioning of the file descriptor. [ Checking the spec ] That's likely true, read-modify-write is recommended. Can changes this. Consequently, quite a few other spots in qemu should then be changed as well... Jan --------------enigC2195FAB0D9C931341B2A8C6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkRmT4ACgkQniDOoMHTA+nKiACeO9jpKhlM66NfcO5VkUNMU8sl lDoAn0ESBtqhNRfUHk23/VHs70wDjC+f =yevb -----END PGP SIGNATURE----- --------------enigC2195FAB0D9C931341B2A8C6--