Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2002 15:37:09 +0200
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        Maxim Konovalov <maxim@macomnet.ru>
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>
In-Reply-To: <20020122134743.A79522-100000@news1.macomnet.ru>
References:  <200201221044.g0MAi3a04838@freefall.freebsd.org> <20020122134743.A79522-100000@news1.macomnet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020122153709.A22222>