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 techtonik
Recipients loewis, sbt, techtonik, terry.reedy
Date 2013-09-29.17:09:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On Sun, Sep 29, 2013 at 3:03 PM, Richard Oudkerk <> wrote:
> _spawn*() and _exec*() are implemented by the C runtime library.  spawn*() and execv() are (deprecated) aliases.

It is said that execv() is deprecated, but it is not said that it is
alias of _execv(). It is only said that _execv() is C++ compliant.

> The the first message is about someone's attempt to work around the problems with embedded spaces and double quotes by writing a function to escape each argument.  He says he had a partial success.

Don't we have such function already? I don't see the problem in
quoting the string.

> Surely this is basic reading comprehension?

I am mentally crippled. Sorry about that.

>> > Note that on Windows exec*() is useless: it just starts a subprocess and
>> > exits the current process.  You can use subprocess to get the same effect.
>> Are you describing Windows implementation of _exec()
>> or current
>> Python implementation?
> The Windows implementaion of _exec().

Does it start child process in foreground or in background? Did you
compile examples on page with new
VC++ to check? I don't possess the VC++ 10, so I can't do this myself.
And I believe that compiling with GCC may lead to different results.

>> > Just use subprocess instead which gets this stuff right.
>> subprocess doesn't replace os.exec*, see issue19060
> On Unix subprocess does not replace os.exec*().  That is because on Unix exec*() replaces the current process with a new process with the *same pid*.  subprocess cannot do this.
> But on Windows os.exec*() just starts an independent process with a *different pid* and exits the current process.  The line
>     os.execv(path, args)
> is equivalent to
>     os.spawnv(os.P_NOWAIT, path, args)
>     os._exit(0)

I don't mind if it runs child process with different pid, but why it
runs new process in background. Unix version doesn't do this.
Date User Action Args
2013-09-29 17:09:00techtoniksetrecipients: + techtonik, loewis, terry.reedy, sbt
2013-09-29 17:09:00techtoniklinkissue19066 messages
2013-09-29 17:09:00techtonikcreate