This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients docs@python, eryksun, jwilk, paul.moore, steve.dower, techtonik, terry.reedy, tim.golden, zach.ware
Date 2021-03-30.17:07:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617124027.51.0.325049037867.issue19124@roundup.psfhosted.org>
In-reply-to
Content
> 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).
History
Date User Action Args
2021-03-30 17:07:07steve.dowersetrecipients: + steve.dower, terry.reedy, paul.moore, techtonik, tim.golden, jwilk, docs@python, zach.ware, eryksun
2021-03-30 17:07:07steve.dowersetmessageid: <1617124027.51.0.325049037867.issue19124@roundup.psfhosted.org>
2021-03-30 17:07:07steve.dowerlinkissue19124 messages
2021-03-30 17:07:07steve.dowercreate