lkml.org 
[lkml]   [1996]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: FIFO and tty programming details?
Leslie Mikesell:

: Yes, following up my own posting... The only real difference
: turned out to be that SysV returned 0 from a non-blocking read()
: with nothing in the FIFO and Linux returns -1. Is this
: posix-specified behaviour?

Yes. 6.4.1.2: When attempting from an empty pipe (or FIFO):
(i) If no process has the pipe open for writing, read() shall
return 0 to indicate end-of-file.
(ii) If some process has the pipe open for writing and O_NONBLOCK
is set, read() shall return -1 and set errno to EAGAIN.
...


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.028 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site