From owner-freebsd-fs@FreeBSD.ORG Fri Mar 25 12:25:12 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6404E1065678 for ; Fri, 25 Mar 2011 12:25:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3BBFD8FC14 for ; Fri, 25 Mar 2011 12:25:12 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CAFFA46B09; Fri, 25 Mar 2011 08:25:11 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C9ED8A01B; Fri, 25 Mar 2011 08:25:11 -0400 (EDT) From: John Baldwin To: freebsd-fs@freebsd.org Date: Fri, 25 Mar 2011 08:14:47 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110311; KDE/4.5.5; amd64; ; ) References: <20110325005923.GI78089@deviant.kiev.zoral.com.ua> In-Reply-To: <20110325005923.GI78089@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103250814.47903.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 25 Mar 2011 08:25:11 -0400 (EDT) Cc: Subject: Re: O_CLOEXEC X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:25:12 -0000 On Thursday, March 24, 2011 8:59:24 pm Kostik Belousov wrote: > Hi, > below is the implementation of O_CLOEXEC flag for open(2). I also > handle the fhopen(2), since the man page states that fhopen(2) takes > the same flags as open(2), and it is more logical to change code > then man page. > > It is somewhat curious that SUSv4 did not specified O_CLOEXEC behaviour > for posix_openpt(). I left it out, but it probably makes sense to > allow O_CLOEXEC there ? > > The falloc() KPI is left as is because the function is often used > in the kernel and probably in the third-party modules. fdallocf() > takes additional flag argument to set close-on-exec before any other > thread might see new file descriptor. Hmm, I don't actually expect falloc() to be used in 3rd party modules and would be fine with just adding a new flags parameter to it. -- John Baldwin