Asri-unix.380
net.unix-wizards
utzoo!decvax!ucbvax!menlo70!sri-unix!dpk@BMD70
Wed Dec 30 23:29:28 1981
Re: who one two three four five six
From: Doug Kingston <DPK@BMD70>
The strange behavior that Robert Owens was talking about is
one of possible results of having stray file descriptors left open
by the invoking program. It all depends on how that error is handled
(Try again.). I am not saying that this has to be his problem, but
it might be.
A while ago I send an inquiry to U-W asking if there were any problems
with changing popen to close all file descriptors except 0, 1, and 2 before
it execed the program. One response correctly urged caution in changing
anything like POPEN, another mentioned that one might want to pass an
open file descriptor to a child. While this is certainly possible, it
would be very bad form. The program would have to know which file descriptor
to use or have it passed as a command line arg (UGH!). We would consider
asking people to use pipe, fork, and exec for these cases. (Note, we do not
have IOCTL close on exec ... But soon ...). Any other thoughts on this matter?
Cheers,
Doug Kingston
PS. What does CSH do to open file-descripters when it is execed?
-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <
[email protected]>
of
http://communication.ucsd.edu/A-News/
This Usenet Oldnews Archive
article may be copied and distributed freely, provided:
1. There is no money collected for the text(s) of the articles.
2. The following notice remains appended to each copy:
The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.