what does read(2) do if O_NDELAYed?
Randy Orrison
randy at umn-cs.cs.umn.edu
Tue Jun 28 05:28:10 AEST 1988
>From the 4.3BSD (Mt. Xinu) open(2) man page:
| If the O_NDELAY flag is specified and
| the open call would result in the process being blocked for
| some reason (e.g. waiting for carrier on a dialup line), the
| open returns immediately. The first time the process
| attempts to perform i/o on the open file it will block (not
| currently implemented).
Ok, so it's not currently implemented. What happens? If you open(2) a
file with O_NDELAY and then read from it, what happens? I would guess
that the read wouldn't block, but what would it do? (did i make my
question clear?)
Also, if a file is opened without O_NDELAY and the process blocks, can the
open be interrupted? I notice in read(2) that a valid error return is EINTR,
but I don't see that for open(2). Are opens uninterruptable?
What's the situation on System V? (SVID/POSIX, too!)
Thanks in advance!
-randy
(Please reply to me, if there are requests i will summarize responses here)
--
Randy Orrison, Control Data, Arden Hills, MN
randy at ux.acss.umn.edu {bungia, uunet!hi-csc, rutgers, sun}!umn-cs!randy
"I consulted all the sages I could find in Yellow Pages,
but there aren't many of them." -APP
More information about the Comp.unix.wizards
mailing list