fcntl() versus ioctl()
Guy Harris
guy at gorodish.Sun.COM
Thu Sep 15 07:04:05 AEST 1988
> Isn't it a dubious feature that the PARENT should suffer if a CHILD decides
> to set the FNDELAY flag of stdin?
Arguably.
> It's an FCNTL() we're talking about, not an IOCTL()!
The problem is that there are two sets of "file descriptor" flags: those stored
per-process, and those stored per "file table entry". The "file table entry"
is shared by file descriptors passed to children, or created by "dup"; it holds
the seek pointer.
Unfortunately, the no-delay flag is a "file table entry" flag, not a
per-process flag. The only per-process flag is the "close on exec" flag.
There exist "fcntl"s to manipulate both.
More information about the Comp.unix.questions
mailing list