Message198587
> I am not sure that I should see there. There is discussion of DOS,
> which is not supported, also some complain about Windows execv
> function, which deprecated since VC++ 2005 (which I hope also not
> supported). Can you be more specific?
_spawn*() and _exec*() are implemented by the C runtime library. spawn*() and execv() are (deprecated) aliases.
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.
Surely this is basic reading comprehension?
> > 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()
> http://msdn.microsoft.com/en-us/library/431x4c1w.aspx or current
> Python implementation?
The Windows implementaion of _exec().
> > 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) |
|
Date |
User |
Action |
Args |
2013-09-29 12:03:26 | sbt | set | recipients:
+ sbt, loewis, terry.reedy, techtonik |
2013-09-29 12:03:26 | sbt | set | messageid: <1380456206.36.0.261451077717.issue19066@psf.upfronthosting.co.za> |
2013-09-29 12:03:26 | sbt | link | issue19066 messages |
2013-09-29 12:03:25 | sbt | create | |
|