Message198613
On Sun, Sep 29, 2013 at 6:39 PM, Richard Oudkerk <report@bugs.python.org> wrote:
>
> Richard Oudkerk added the comment:
>
> As I wrote in http://bugs.python.org/issue19066, on Windows execv() is equivalent to
>
> os.spawnv(os.P_NOWAIT, ...)
> os._exit(0)
Where did you get that info? MSDN is silent about that.
http://msdn.microsoft.com/en-us/library/886kc0as(v=vs.90).aspx
> This means that control is returned to cmd when the child process *starts* (and afterwards you have cmd and the child connected to the same console).
>
> On Unix control is returned to the shell only once the child process *ends*.
That was my conclusion also.
> Although it might be less memory efficient, you would actually get something closer to Unix behaviour by replacing os.execv(...) with
>
> sts = os.spawnv(os.P_WAIT, ...)
> _exit(sts)
>
> or
>
> sts = subprocess.call(...)
> _exit(sts)
>
> This is why I said that execv() is useless on Windows and that you should just use subprocess instead.
The problem is not in what I should or should not use. The problem
that existing scripts that work on Unix and use os.execv() to launch
interactive scripts, on Windows behave absolutely weird and unusable
behavior. I previously experienced this with SCons, but couldn't get
the reason. Now I experience this with basic Android development tools
and dug down to this. It is clearly a big mess from this side of
Windows. |
|
Date |
User |
Action |
Args |
2013-09-29 17:31:36 | techtonik | set | recipients:
+ techtonik, sbt |
2013-09-29 17:31:36 | techtonik | link | issue19124 messages |
2013-09-29 17:31:36 | techtonik | create | |
|