The new std.process is ready for review

Vladimir Panteleev vladimir at thecybershadow.net
Sat Mar 9 16:51:49 PST 2013


On Saturday, 9 March 2013 at 16:05:15 UTC, Lars T. Kyllingstad 
wrote:
> 1. Make a "special" spawnProcess() function for pipe 
> redirection.
> 2. Use the "process object" approach, like Tango and Qt.
> 3. After fork(), in the child process, loop over the full range 
> of possible file descriptors and close the ones we don't want 
> open.
>
> The last one would let us keep the current API (and would have 
> the added benefit of cleaning up unused FDs) but I have no idea 
> how it would impact performance.

How about this: Set FD_CLOEXEC on all pipes just after creation, 
but clear the flag for the relevant pipes before exec?


More information about the Digitalmars-d mailing list