Debian Bug report logs - #360243
manpages-dev: open.2: incorrect explanation of O_NONBLOCK

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: ROBERTOJIMENOCA@terra.es

Date: Fri, 31 Mar 2006 15:48:05 UTC

Severity: normal

Tags: fixed-upstream

Found in version manpages-dev/2.22-1

Fixed in version manpages/2.29-1

Done: Martin Schulze <joey@infodrom.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to ROBERTOJIMENOCA@terra.es:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Fri, 31 Mar 2006 17:22:26 +0200 (MEST)
Package: manpages-dev
Version: 2.22-1

/usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
"This mode need not have any effect on files other than FIFOs."

I'm almost sure that statement is false.
O_NONBLOCK prevents blocking on any filehandle (files, sockets, fifos,
devices, ...).



Prueba el Nuevo Correo Terra; Seguro, Rápido, Fiable.




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #10 received at 360243@bugs.debian.org (full text, mbox):

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: ROBERTOJIMENOCA@terra.es, 360243@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Fri, 31 Mar 2006 11:10:11 -0500
On Fri, Mar 31, 2006 at 05:22:26PM +0200, ROBERTOJIMENOCA@terra.es wrote:
> Package: manpages-dev
> Version: 2.22-1
> 
> /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> "This mode need not have any effect on files other than FIFOs."
This probably means "Use of O_NONBLOCK on an arbitrary system isn't
allowed to assume that it will have any effect."

See, for example, </usr/share/doc/susv3/susv3/functions/open.html>,
which says that behaviour of O_NONBLOCK is unspecified for normal
files.  That it is implemented and useful on Linux is just a nicety :)

Justin



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to ROBERTOJIMENOCA@terra.es:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #15 received at 360243@bugs.debian.org (full text, mbox):

From: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>
To: Justin Pryzby <justinpryzby@users.sourceforge.net>, 360243@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Fri, 31 Mar 2006 18:25:53 +0200 (MEST)
Justin Pryzby wrote:
> On Fri, Mar 31, 2006 at 05:22:26PM +0200, ROBERTOJIMENOCA@terra.es wrote:
> > Package: manpages-dev
> > Version: 2.22-1
> > 
> > /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> > "This mode need not have any effect on files other than FIFOs."
> This probably means "Use of O_NONBLOCK on an arbitrary system isn't
> allowed to assume that it will have any effect."
> 
> See, for example, </usr/share/doc/susv3/susv3/functions/open.html>,
> which says that behaviour of O_NONBLOCK is unspecified for normal
> files.  That it is implemented and useful on Linux is just a nicety :)

I think that statement is confusing and should document what Linux or
any modern UNIX non-broken system should do.

That statement should be removed IMHO.



Prueba el Nuevo Correo Terra; Seguro, Rápido, Fiable.




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #20 received at 360243@bugs.debian.org (full text, mbox):

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>, 360243@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Fri, 31 Mar 2006 11:46:36 -0500
On Fri, Mar 31, 2006 at 06:25:53PM +0200, ROBERTOJIMENOCA@terra.es wrote:
> Justin Pryzby wrote:
> > On Fri, Mar 31, 2006 at 05:22:26PM +0200, ROBERTOJIMENOCA@terra.es wrote:
> > > Package: manpages-dev
> > > Version: 2.22-1
> > > 
> > > /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> > > "This mode need not have any effect on files other than FIFOs."
> > This probably means "Use of O_NONBLOCK on an arbitrary system isn't
> > allowed to assume that it will have any effect."
> > 
> > See, for example, </usr/share/doc/susv3/susv3/functions/open.html>,
> > which says that behaviour of O_NONBLOCK is unspecified for normal
> > files.  That it is implemented and useful on Linux is just a nicety :)
> 
> I think that statement is confusing and should document what Linux or
> any modern UNIX non-broken system should do.
> 
> That statement should be removed IMHO.
Perhaps, but notes about portability can be useful, for example, to
avoid writing a whole bunch of nonportable stuff under the assumption
that linux manpages aren't totally specific to linux.  I don't know
where to draw the line, or just how often O_NONBLOCK is limited to
special files, or if it is actually documented as working on other
systems.

Justin



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to "Michael Kerrisk" <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #25 received at 360243@bugs.debian.org (full text, mbox):

From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: ROBERTOJIMENOCA@terra.es,360243@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Fri, 31 Mar 2006 22:21:50 +0200 (MEST)
tags 360243 fixed-upstream
thanks

> Von: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>

> /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> "This mode need not have any effect on files other than FIFOs."
> 
> I'm almost sure that statement is false.
> O_NONBLOCK prevents blocking on any filehandle (files, sockets, fifos,
> devices, ...).

Hello Roberto,

Justin is on the right track in mentioning the "standard" 
behavior of O_NONBLOCK.  And you haven't got things quite 
right -- for example, O_NONBLOCK can't be used for open() with 
sockets, because we can't open() a socket, and O_NONBLOCK has 
no meaning for regular files (it is just silently ignored).  

But I agree that the man page is a bit misleading.  One might
get the impression that, for example, O_NONBLOCK can't be used 
for sockets, although we can enable O_NONBLOCK on a socket using 
fcntl().  And O_NONBLOCK does have meaning for some devices,
and sometimes has an effect for regular files.

I have made the following changes:

* Removed that sentence from open.2 ;-).

* Added a sentence noting that the effect of O_NONBLOCK
  for file locks and leases is described in fcntl.2.

* Somewhat expanded the discussion of mandatory locking in 
  fcntl.2.

The changes will appear in upstream 2.29.

Thanks for your report.  

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.



Tags added: fixed-upstream Request was from "Michael Kerrisk" <mtk-manpages@gmx.net> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to ROBERTOJIMENOCA@terra.es:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #32 received at 360243@bugs.debian.org (full text, mbox):

From: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>
To: Michael Kerrisk <mtk-manpages@gmx.net>, 360243@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Sat, 1 Apr 2006 01:02:49 +0200 (MEST)
Michael Kerrisk wrote:
> > Von: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>
> > /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> > "This mode need not have any effect on files other than FIFOs."
> > 
> > I'm almost sure that statement is false.
> > O_NONBLOCK prevents blocking on any filehandle (files, sockets, fifos,
> > devices, ...).
> 
> Justin is on the right track in mentioning the "standard" 
> behavior of O_NONBLOCK.  And you haven't got things quite 
> right -- for example, O_NONBLOCK can't be used for open() with 
> sockets, because we can't open() a socket, and O_NONBLOCK has 
> no meaning for regular files (it is just silently ignored).  

Yes, the de jure standard as susv3 may say is that, but the de facto
standard as _any_ modern UNIX does is the same for every type of file.

> But I agree that the man page is a bit misleading.  One might
> get the impression that, for example, O_NONBLOCK can't be used 
> for sockets, although we can enable O_NONBLOCK on a socket using 
> fcntl().  And O_NONBLOCK does have meaning for some devices,
> and sometimes has an effect for regular files.

O_NONBLOCK _always_ has an effect for regular files, it prevents
blocking on read or write operations (as an example think in NFS or slow
disks)

> I have made the following changes:
> 
> * Removed that sentence from open.2 ;-).
> 
> * Added a sentence noting that the effect of O_NONBLOCK
>   for file locks and leases is described in fcntl.2.
> 
> * Somewhat expanded the discussion of mandatory locking in 
>   fcntl.2.
> 
> The changes will appear in upstream 2.29.

You may always want to attach the patch or an URL for review.

Thanks for these changes. I already knew they were misleading to many
people.



Prueba el Nuevo Correo Terra; Seguro, Rápido, Fiable.




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#360243; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to "Michael Kerrisk" <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #37 received at 360243@bugs.debian.org (full text, mbox):

From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: ROBERTOJIMENOCA@terra.es
Cc: 360243@bugs.debian.org
Subject: Re: Bug#360243: manpages-dev: open.2: incorrect explanation of O_NONBLOCK
Date: Sat, 1 Apr 2006 01:26:45 +0200 (MEST)
Hi Roberto,

> Michael Kerrisk wrote:
> > > Von: "ROBERTOJIMENOCA@terra.es" <ROBERTOJIMENOCA@terra.es>
> > > /usr/share/man/man2/open.2.gz has (under O_NONBLOCK):
> > > "This mode need not have any effect on files other than FIFOs."
> > > 
> > > I'm almost sure that statement is false.
> > > O_NONBLOCK prevents blocking on any filehandle (files, sockets, 
> > > fifos, devices, ...).
> > 
> > Justin is on the right track in mentioning the "standard" 
> > behavior of O_NONBLOCK.  And you haven't got things quite 
> > right -- for example, O_NONBLOCK can't be used for open() with 
> > sockets, because we can't open() a socket, and O_NONBLOCK has 
> > no meaning for regular files (it is just silently ignored).  
> 
> Yes, the de jure standard as susv3 may say is that, but the de facto
> standard as _any_ modern UNIX does is the same for every type of file.
> 
> > But I agree that the man page is a bit misleading.  One might
> > get the impression that, for example, O_NONBLOCK can't be used 
> > for sockets, although we can enable O_NONBLOCK on a socket using 
> > fcntl().  And O_NONBLOCK does have meaning for some devices,
> > and sometimes has an effect for regular files.
> 
> O_NONBLOCK _always_ has an effect for regular files, it prevents
> blocking on read or write operations (as an example think in NFS or slow
> disks)

I'm not sure of the details for NFS, and probably I don't need to
worry about them anyway, as far as this page is concerned.  But
what do you mean by a "slow disk"?

> > I have made the following changes:
> > 
> > * Removed that sentence from open.2 ;-).
> > 
> > * Added a sentence noting that the effect of O_NONBLOCK
> >   for file locks and leases is described in fcntl.2.
> > 
> > * Somewhat expanded the discussion of mandatory locking in 
> >   fcntl.2.
> > 
> > The changes will appear in upstream 2.29.
> 
> You may always want to attach the patch or an URL for review.

2.29 should be out in a week or so, and I'll send a mail when it
is released; could you let me know then if anything still needs
fixing in your opinion.

> Thanks for these changes. I already knew they were misleading to many
> people.

De nada.

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.



Reply sent to Martin Schulze <joey@infodrom.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to ROBERTOJIMENOCA@terra.es:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #42 received at 360243-close@bugs.debian.org (full text, mbox):

From: Martin Schulze <joey@infodrom.org>
To: 360243-close@bugs.debian.org
Subject: Bug#360243: fixed in manpages 2.29-1
Date: Fri, 26 May 2006 23:47:09 -0700
Source: manpages
Source-Version: 2.29-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive:

manpages-dev_2.29-1_all.deb
  to pool/main/m/manpages/manpages-dev_2.29-1_all.deb
manpages_2.29-1.diff.gz
  to pool/main/m/manpages/manpages_2.29-1.diff.gz
manpages_2.29-1.dsc
  to pool/main/m/manpages/manpages_2.29-1.dsc
manpages_2.29-1_all.deb
  to pool/main/m/manpages/manpages_2.29-1_all.deb
manpages_2.29.orig.tar.gz
  to pool/main/m/manpages/manpages_2.29.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 360243@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Schulze <joey@infodrom.org> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 27 May 2006 06:58:25 +0200
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 2.29-1
Distribution: unstable
Urgency: low
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Martin Schulze <joey@infodrom.org>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 360243
Changes: 
 manpages (2.29-1) unstable; urgency=low
 .
   * New upstream source
     . Clarified discussion of file types affected by O_NONBLOCK in open(2)
       (closes: Bug#360243)
Files: 
 aed925560c3fb30c8ded7ac2f13dd579 584 doc - manpages_2.29-1.dsc
 4abdc2c67929587d9d8af320b9191df5 1146337 doc - manpages_2.29.orig.tar.gz
 8d42e9359426b2da5a79eef48e7f165f 49504 doc - manpages_2.29-1.diff.gz
 5ceb41f0ebddec690ea5477c6f90af36 464726 doc important manpages_2.29-1_all.deb
 b058c9b0ba655e7651e0fbd4c3ab8097 1179284 doc standard manpages-dev_2.29-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEd/KGW5ql+IAeqTIRAgytAJ4j6hAuYstxAgMG5AvRegl48crJmACeII3D
3iGzlduchp4dAwIbXLpu7sU=
=qfLc
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 09:46:24 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 23:28:06 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.