2013/1/8 Victor Stinner <victor.stin...@gmail.com>:
> Oops, I sent my email too early by mistake (it was not finished).
>
>> The myriad cloexec
>> APIs between different platforms suggests to me that using this
>> features requires understanding its various quirks on different
>> platforms.
>
> Sorry, I don't understand. What do you mean by "various quirks". The
> "close-on-exec" feature is implemented differently depending on the
> platform, but it always have the same meaning. It closes the file when
> a subprocess is created. Running a subprocess is also implemented
> differently depending on the OS, there are two mains approaches:
> fork()+exec() on UNIX, <something else> on Windows (I don't know how
> it works on Windows).
>
> Extract of fcntl() manual page on Linux: "If the FD_CLOEXEC  bit  is
> 0, the file descriptor will remain open across an execve(2), otherwise
> it will be closed."
>
> I would like to expose the OS feature using a portable API to hide the
> "The myriad cloexec APIs".

Okay, fair enough, but I really would like it not to ever raise
NotImplementedError. Then you would end up having different codepaths
for various oses anyway.



-- 
Regards,
Benjamin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to