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 connected to the same console). On Unix control is returned to the shell only once the child process *ends*. 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. ---------- nosy: +sbt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com