Steve Dower <steve.do...@python.org> added the comment:

> emulating exec() is probably good enough for most cases, especially if code 
> expects to work in Windows.

I think good-enough emulation is fine, but we should update the docs to clarify 
that non-Unix platforms may create a subprocess with a new PID, and callers 
should avoid relying on POSIX semantics if they may run on non-compliant 
platforms.

> If Python implements its own system() and spawnv[e]() functions, support for 
> inheritable file descriptors [1] would probably have to be dropped

I don't see how its behaviour would change at all, unless we're going well out 
of our way to override the CRT. Which I wouldn't want to see us do.

So let's at least fix the current issue of having the child process break away 
immediately, by waiting for it and then exiting. Even if that's just swapping 
the execv call for spawnv(_P_WAIT) and then exiting, that's fine by me (all the 
CRT calls go through the same path, so they'll launch it consistently 
regardless of mode).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue19124>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to