Victor Stinner <victor.stin...@gmail.com> writes:

>
> Q: The PEP may break applications.
> A: Most developers agree that it is (very) unlikely. If file
> descriptor inherance matters, subprocess must be used (because it
> rocks!) with pass_fds. 

But that doesn't cover the case for programs that don't fork and really
just want to exec another program. when using subprocess, you'll always
have two processes running.

> If subprocess is used without pass_fds,
> applications stops working since python 3.2 (since python 3.0 on
> Windows). pass_fds will clear the close-on-exec flag on the file
> descriptors with the PEP. If an application breaks because it relies
> on file descriptor inherance, it's easy to detect it (EBADF error) and

the application may open other files/sockets and the unused file
descriptor would be reused. there's no EBADF in that case.
_______________________________________________
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