[issue19124] os.execv executes in background on Windows

2021-03-30 Thread Eryk Sun
Eryk Sun added the comment: > Even if that's just swapping the execv call for spawnv(_P_WAIT) > and then exiting, that's fine by me Maybe call SuspendThread() on other threads, at least the ones that can be enumerated with the threading module. > I don't see how its behaviour would change a

[issue19124] os.execv executes in background on Windows

2021-03-30 Thread Steve Dower
Steve Dower 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 calle

[issue19124] os.execv executes in background on Windows

2021-03-30 Thread Eryk Sun
Eryk Sun added the comment: Steve, what do you think about os.exec*()? Should it be emulated better or deprecated? We can't hide the reality that it's a new process with a different process ID and parent process ID -- against what POSIX requires. But emulating exec() is probably good enoug

[issue19124] os.execv executes in background on Windows

2021-03-29 Thread Steve Dower
Steve Dower added the comment: > nt.spawnv[e](), nt.waitpid(), and nt.system() could also be implemented with > subprocess. I like the idea, but we shouldn't invert the dependencies like that. nt/os is a lower-level library, and should provide its own implementation (that perhaps subprocess

[issue19124] os.execv executes in background on Windows

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: > On Windows, the new process is executed in the background but > can send output to a console if the original process was > started in a console. C execv[e]() is a mess for console applications. The child process is competing for console input with an ancestor p

[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Python-

[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Eryk Sun
Eryk Sun added the comment: The exec functions provided by the Windows C runtime really are practically useless, due to creating an orphaned process, disrupting synchronous operation, and returning the wrong status code. It might be more useful for Python 3.7.x to implement an internal win32_

[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue19124] os.execv executes in background on Windows

2013-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: In general, os module functions lightly wrap the corresponding operating system calls. It does not mask differences between OSes, or between versions of an OS. So the unix-windows difference is not a bug and the behavior will not change. The difference could,

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Visual Studio 10+ ? Is it available somewhere for a reference? Old versions of the relevant files are here: http://www.controllogics.com/software/VB6/VC98/CRT/SRC/EXECVE.C http://www.controllogics.com/software/VB6/VC98/CRT/SRC/SPAWNVE.C http://www.controllog

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: -sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
Changes by anatoly techtonik : -- resolution: rejected -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: I can't use subprocess. These are official "business suite" scripts for Android development from Google. -- ___ Python tracker ___ _

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 8:53 PM, Richard Oudkerk wrote: > > Richard Oudkerk added the comment: > >> Where did you get that info? MSDN is silent about that. >> http://msdn.microsoft.com/en-us/library/886kc0as(v=vs.90).aspx > > Reading the source code for the C

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Where did you get that info? MSDN is silent about that. > http://msdn.microsoft.com/en-us/library/886kc0as(v=vs.90).aspx Reading the source code for the C runtime included with Visual Studio. > The problem is not in what I should or should not use. The probl

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 6:39 PM, Richard Oudkerk 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

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread Richard Oudkerk
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) This means that control is returned to cmd when the child process *starts* (and afterwards you have cmd and the child connect

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
Changes by anatoly techtonik : Added file: http://bugs.python.org/file31905/testexecvchild.py ___ Python tracker ___ ___ Python-bugs-list mail

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: s/same behavior/same command/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
New submission from anatoly techtonik: os.execv() starts process in background on Windows. Because it inherits stdin/stdout handlers from the process that launched Python interpreter, this becomes a source of numerous weird bugs, from polluting the stdout stream of parent to completely blockin