Shouldn't System.Process.runInteractiveCommand close inherited descriptors above 2?

Adam Langley agl at imperialviolet.org
Mon Jun 4 12:17:44 EDT 2007


On 6/4/07, Tomasz Zielonka <tomasz.zielonka at gmail.com> wrote:
> So the question is: shouldn't runInteractiveCommand /
> runInteractiveProcess close descriptors greater then 2 in the child
> process?

This is actually a pretty subtle area of POSIX (and probably something
that was badly designed in the first place). Inheriting of fds is
often surprising, but if the runtime were to close everything > 2,
then how would you be able to pass one to a child process? There are
many instances where you want to do this[1].

Maybe there needs to be an additional argument which contains fd
numbers which should be passed down?


[1] http://cr.yp.to/ucspi-tcp/tcpclient.html

-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641


More information about the Libraries mailing list