fcntl() versus ioctl() - yes!

Maarten Litmaath maart at cs.vu.nl
Fri Sep 16 15:49:47 AEST 1988


In article <7034 at ki4pv.uucp> tanner at ki4pv.uucp (Dr. T. Andrews) writes:
\In article <1380 at solo7.cs.vu.nl>, maart at cs.vu.nl (Maarten Litmaath) writes:
\) Isn't it a dubious feature that the PARENT should suffer if a CHILD
\) decides) to set the FNDELAY flag of stdin? It's an FCNTL() we're
\) talking about, not an IOCTL()!
\
\Well, this is a good question.  Let's examine it.  First of all, note
\that fcntl(2) operates on file descriptors (just like ioctl(2) does).
\In many environments, it even offers several of the same sorts of
\controls.  I don't see any moral difference between fcntl(2) and
\ioctl(2), myself.

Aha! And where's the expected next statement: why has fcntl() been invented
in the first place?

\Now, consider the effect proposed by maart at cs.vu.nl above: that the
\parent's fd should not be affected by a child's action.

That's NOT what I said! My point was: let fcntl() handle the local (i.e.
per-process) effects, and leave the global effects to ioctl().
(Special attention to my .signature, please.)
-- 
    Alles klar,                       |Maarten Litmaath @ Free U Amsterdam:
                   Herr Kommissar?    |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list