Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932967AbXBBMKv (ORCPT ); Fri, 2 Feb 2007 07:10:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933377AbXBBMKu (ORCPT ); Fri, 2 Feb 2007 07:10:50 -0500 Received: from rk.rkuhn.info ([88.198.164.84]:59447 "EHLO mailhost.rkuhn.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932967AbXBBMKt (ORCPT ); Fri, 2 Feb 2007 07:10:49 -0500 In-Reply-To: <87abzxbhau.fsf@tantale.fifi.org> References: <200701272152.11087.vda.linux@googlemail.com> <87bqkhuqpp.fsf@tantale.fifi.org> <200702020000.40524.vda.linux@googlemail.com> <87abzxbhau.fsf@tantale.fifi.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-134-984988787" Message-Id: Cc: Denis Vlasenko , linux-kernel@vger.kernel.org From: Roland Kuhn Subject: Re: O_NONBLOCK setting "leak" outside of a process?? Date: Fri, 2 Feb 2007 13:10:32 +0100 To: Philippe Troin Content-Transfer-Encoding: 7bit X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.2) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8314 Lines: 162 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-134-984988787 Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-133-984988767; protocol="application/pkcs7-signature" --Apple-Mail-133-984988767 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Philippe! On 2 Feb 2007, at 00:15, Philippe Troin wrote: > Denis Vlasenko writes: > >> What share the same file descriptor? MC and programs started from it? > > All the processes started from your shell share at least fds 0, 1 > and 2. > >> I thought after exec() fds atre either closed (if CLOEXEC) or >> becoming independent from parent process >> (i.e. it you seek, close, etc your fd, parent would not notice that). >> >> Am I wrong? > > I'm afraid so. Seek position and flags are still shared after an > exec. > That's a bug, right? I couldn't find anything to that effect in IEEE Std. 1003.1, 2004 Edition... Ciao, Roland -- TU Muenchen, Physik-Department E18, James-Franck-Str., 85748 Garching Telefon 089/289-12575; Telefax 089/289-12570 -- CERN office: 892-1-D23 phone: +41 22 7676540 mobile: +41 76 487 4482 -- Any society that would give up a little liberty to gain a little security will deserve neither and lose both. - Benjamin Franklin -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GS/CS/M/MU d-(++) s:+ a-> C+++ UL++++ P+++ L+++ E(+) W+ !N K- w--- M + !V Y+ PGP++ t+(++) 5 R+ tv-- b+ DI++ e+++>++++ h---- y+++ ------END GEEK CODE BLOCK------ --Apple-Mail-133-984988767 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIINxTCCBi4w ggUWoAMCAQICCmEPqkwAAAAAAAMwDQYJKoZIhvcNAQEFBQAwQTESMBAGCgmSJomT8ixkARkWAmNo MRQwEgYKCZImiZPyLGQBGRYEY2VybjEVMBMGA1UEAxMMQ0VSTiBSb290IENBMB4XDTA2MTAwMzA5 MzYxM1oXDTE2MTAwMzA5NDYxM1owWTESMBAGCgmSJomT8ixkARkWAmNoMRQwEgYKCZImiZPyLGQB GRYEY2VybjEtMCsGA1UEAxMkQ0VSTiBUcnVzdGVkIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIB IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwdFGqthhWlgUOSZ6C6hReNEVGzbjf2IQgxo7 /rOfOQHZH3krQPQ37fqFroEr46PrruymZ/U+QAzmESZQ4Z+nCfBhm7cEi0TIhihHd4cEPaPxawGR T9Ck7BBk9za8TUljF6c/JodnIcmIrpbazEbS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ImiZPyLGQBGRYEY2VybjEtMCsGA1UEAxMkQ0VS TiBUcnVzdGVkIENlcnRpZmljYXRpb24gQXV0aG9yaXR5AgpyGYEeAAIAAAJmMAkGBSsOAwIaBQCg ggFPMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDIwMjEyMTAz M1owIwYJKoZIhvcNAQkEMRYEFNNMZXee2zSCXXaxJd8LmbC9Ni+rMHYGCSsGAQQBgjcQBDFpMGcw WTESMBAGCgmSJomT8ixkARkWAmNoMRQwEgYKCZImiZPyLGQBGRYEY2VybjEtMCsGA1UEAxMkQ0VS TiBUcnVzdGVkIENlcnRpZmljYXRpb24gQXV0aG9yaXR5AgpyGYEeAAIAAAJmMHgGCyqGSIb3DQEJ EAILMWmgZzBZMRIwEAYKCZImiZPyLGQBGRYCY2gxFDASBgoJkiaJk/IsZAEZFgRjZXJuMS0wKwYD VQQDEyRDRVJOIFRydXN0ZWQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkCCnIZgR4AAgAAAmYwDQYJ KoZIhvcNAQEBBQAEggEALznENrjkyVwnZrDM9ax+9Kpw7bv7gzHrcI0KfpXMX/WaK7VUyAOwdIhU T4nBRSu+rlZ3Jxn4jqjqpo+g3dYFbBYtCstcbT2+MTcGOsoQ4wz3oJH55nPzr/luCcNns13fgTvQ OrC4uxwTWNNS0cVSQXgfK4H4eUpqep+T7z7MVvJ1pzXJvC/LxBknmzkW8P5ZdtvxK6x+2Ik81yGf ZLgS/BG7NS7JuhlmHnZI/Q4B2pYKh9/fo6LH94Jp4FLh0gk6HO5bcpBYS3ql58xZCwfD+MKAT8Ec CEm/jUt7sEyU13Bk112l5cX2XNhNtBaZXWD4gwvVq6KNsHw48cVuLYHHUAAAAAAAAA== --Apple-Mail-133-984988767-- --Apple-Mail-134-984988787 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFwyo+I4MWO8QIRP0RAvmBAKCeCKH4gVGncDeRIe94wrvX+zOe2ACcDj6j /wfhT21ddLN4dckC3LWYe4g= =MaJe -----END PGP SIGNATURE----- --Apple-Mail-134-984988787-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/