Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: shell file descriptor programming (was: Unlinked temp files) Message-ID: <11566@ulysses.homer.nj.att.com> Date: 20 May 89 17:14:38 GMT References: <871@marvin.Solbourne.COM> <1015@philmds.UUCP> <296@tree.UUCP> <4542@psuvax1.cs.psu.edu> <134@minya.UUCP> <11529@ulysses.homer.nj.att.com> <8473@chinet.chi.il.us> <11540@ulysses.homer.nj.att.com> <8494@chinet.chi.il.us> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Organization: AT&T Bell Laboratories Lines: 21 In article <8494@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: >That is, add a notation to the >shell to set the close-on-exec flag when you want it. Yes, this would be a good compromise, but the POSIX draft doesn't have such notation. >BTW, how does ksh know how far to go with >its file-closing? I don't recall seeing a handy way to find the >highest allowable fd other than trying them all until you get an >error. The ksh configuration scripts determine how many file descriptors your system supports (by running a test program which does dup()'s until it fails) and creates a configuration header file which is used to compile ksh. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com