Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: fcntl() versus ioctl() Keywords: FNDELAY Message-ID: <68339@sun.uucp> Date: 14 Sep 88 21:04:05 GMT References: <1380@solo7.cs.vu.nl> Sender: news@sun.uucp Lines: 15 > 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.