tags 360243 fixed-upstream
thanks

> Von: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

> /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'.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to