From owner-freebsd-questions Fri Aug 31 0:39:42 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-94-248-46.mmcable.com [24.94.248.46]) by hub.freebsd.org (Postfix) with SMTP id B13E437B401 for ; Fri, 31 Aug 2001 00:39:39 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 41342 invoked by uid 100); 31 Aug 2001 04:48:58 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15247.5946.328998.195977@guru.mired.org> Date: Thu, 30 Aug 2001 23:48:58 -0500 To: "David Xu" Cc: questions@freebsd.org Subject: Re: F_DUPFD close-on-exec flag and Posix compatible In-Reply-To: <87048040@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Xu types: > This is a multi-part message in MIME format. Please don't send HTML to this list. Send both plain text and HTML as you did here is even worse. > Hi, > > I have found our fcntl manual says : > F_DUPFD Return a new descriptor as follows: [...] > o The close-on-exec flag associated with the new = > file > descriptor is set to remain open across = > execve(2) sys- > tem calls. > > it seems close-on-exec flag is not compatible with Posix standard, Posix = > says > the close-on-exec flag for new descriptor is clear. The close-on-exec flag being clear (zero) means that the descriptor will remain open across execve calls. Unless Posix and FreeBSD don't agree on what the close-on-exec flag being zero means, FreeBSD is following Posix. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message