Re: [fpc-devel] Re: inheriting handles using TProcess in unix

2011-01-27 Thread Marco van de Voort
In our previous episode, Seth Grover said: > I have provided a patch. > > http://bugs.freepascal.org/view.php?id=18617 Committed with only marginal changes. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/li

[fpc-devel] Re: inheriting handles using TProcess in unix

2011-01-27 Thread Seth Grover
I have provided a patch. http://bugs.freepascal.org/view.php?id=18617 -SG -- This email is fiction. Any resemblance to actual events or persons living or dead is purely coincidental. Seth Grover sethdgrover[at]gmail[dot]com ___ fpc-devel maillist -

[fpc-devel] Re: inheriting handles using TProcess in unix

2011-01-27 Thread Seth Grover
Marco said: > It is not in all flavours, and many BSDs can turn it off. > But that is more theoretical. The more practical problem is that while /proc > might usually exist, its contents and permissions vary. (and that also goes > for Linux, specially on embedded variants) > If this really is an h

Re: [fpc-devel] Re: inheriting handles using TProcess in unix

2011-01-27 Thread Marco van de Voort
In our previous episode, Seth Grover said: > > > > Michael. > > > > My current thought is to use FindFirst/FindNext in the context of the > child process after the fork but before the exec to enumerate the > contents of /proc/[pid]/fd/ and close all the descriptors greater than > 2. I don't have e

[fpc-devel] Re: inheriting handles using TProcess in unix

2011-01-27 Thread Seth Grover
>> I'm contemplating patching TProcess so that if FInheritHandles >> is false (default is true) it would do this. >> >> Thoughts? > > By all means, go ahead. I didn't know there was a way to enumerate all file > descriptors. > > Michael. > My current thought is to use FindFirst/FindNext in the con