From owner-cvs-all Tue Jan 22 5:37:41 2002 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 4F92137B404; Tue, 22 Jan 2002 05:37:27 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g0MDb9526528; Tue, 22 Jan 2002 15:37:09 +0200 (EET) (envelope-from ru) Date: Tue, 22 Jan 2002 15:37:09 +0200 From: Ruslan Ermilov To: Maxim Konovalov Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/chroot chroot.8 Message-ID: <20020122153709.A22222@sunbay.com> References: <200201221044.g0MAi3a04838@freefall.freebsd.org> <20020122134743.A79522-100000@news1.macomnet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020122134743.A79522-100000@news1.macomnet.ru> User-Agent: Mutt/1.3.23i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Jan 22, 2002 at 01:48:38PM +0300, Maxim Konovalov wrote: > > Ruslan, > > On 02:44-0800, Jan 22, 2002, Ruslan Ermilov wrote: > > > ru 2002/01/22 02:44:03 PST > > > > Modified files: > > usr.sbin/chroot chroot.8 > > Log: > > Finish cleanup in chroot.c CSRG revision 5.6 by Keith Bostic > > (never installed setuid, so don't need to reset the uid). > > > > PR: bin/34159 > > Can you please finish cleanup in open.2? :-) > > Index: open.2 > =================================================================== > RCS file: /home/ncvs/src/lib/libc/sys/open.2,v > retrieving revision 1.21 > diff -u -r1.21 open.2 > --- open.2 2001/10/26 17:38:20 1.21 > +++ open.2 2002/01/22 08:24:20 > @@ -123,8 +123,8 @@ > carrier on a dialup line), > .Fn open > returns immediately. > -The first time the process attempts to perform I/O on the open > -file it will block (not currently implemented). > +This flag also has the effect of making all subsequent I/O on the > +open file non-blocking. > .Pp > If > .Dv O_FSYNC > I can guess that this text was obtained from either OpenBSD or NetBSD, but it doesn't sound correct. Some devices do not have a concept of non-blocking opens and subsequent operations. This also contradicts to POSIX that says: : When opening a block special or character special file that supports : non-blocking opens: : : * If O_NONBLOCK is set, the open( ) function shall return without : blocking for the device to be ready or available. Subsequent ^^^^^^^^^^ : behavior of the device is device-specific. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I liked the BSD/OS text more, which has: Index: open.2 =================================================================== RCS file: /home/ncvs/src/lib/libc/sys/open.2,v retrieving revision 1.21 diff -u -p -r1.21 open.2 --- open.2 2001/10/26 17:38:20 1.21 +++ open.2 2002/01/22 13:37:11 @@ -123,8 +123,7 @@ in the process being blocked for some re carrier on a dialup line), .Fn open returns immediately. -The first time the process attempts to perform I/O on the open -file it will block (not currently implemented). +The descriptor remains in non-blocking mode for subsequent operations. .Pp If .Dv O_FSYNC Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message