[fpc-devel] Re: inheriting handles using TProcess in unix
sethdgrover at gmail.com
Thu Jan 27 14:22:20 CET 2011
>> I'm contemplating patching TProcess so that if FInheritHandles
>> is false (default is true) it would do this.
> By all means, go ahead. I didn't know there was a way to enumerate all file
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 experience in all different flavors of UNIX, but from
what I've read procfs is standard in UNIX.
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.
More information about the fpc-devel