Phobos: Posix hands down open files to sub processes.

Vladimir Panteleev vladimir at thecybershadow.net
Sun Mar 10 22:32:42 PDT 2013


On Monday, 11 March 2013 at 05:24:49 UTC, Marco Leise wrote:
>
> Python:
>
>> def _mkstemp_inner(dir, pre, suf, flags):
>>     """Code common to mkstemp, TemporaryFile, and 
>> NamedTemporaryFile."""

So it only sets the flag on temporary files?

> I think they just rely on the C library at the moment for their 
> System.IO,
> which in turn doesn't set FD_CLOEXEC.

> Rust:
>
> Uses C stdlib.

Is there any discussion on why libc doesn't do it, and what do 
APIs that wrap the C API do?

> Despite the increased maintenance cost I think we should adapt 
> that
> behavoir in D as well.

I don't think there would be a maintenance cost to speak of. 
Wouldn't it be a one-line addition to a few places?


More information about the Digitalmars-d mailing list