New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't use exec on Windows #54
Conversation
it doesn't exec, it does fork & exec, which means the parent process returns immediately, and the 'true' process is put in the background. Windows doesn't actually allow process replacement.
set handler after spawning subprocess so it is still forwarded.
Confirmed working on Windows. |
Link to proof that |
Thanks, @sccolbert! |
I guess that also fixes jupyter/nbconvert#103 ? |
Hah, yes already closed. The page was still opened for me and did not refresh correctly. Thanks. |
This also fixes jupyter console on windows: jupyter/jupyter_console#26 (based on a quick test it seems fixed) |
Use regular Popen instead.
Windows doesn't actually allow process replacement a la unix exec, but Python provides os.exec on Windows even though it doesn't actually work. It doesn't exec, it does fork & exec, which means the parent process returns immediately, and the 'true' process is put in the background.
The alternative is to use execfile on Windows, which would behave the same as exec on *ix, with one exception: it forces all jupyter commands to be run with the same interpreter, rather than respecting shebang lines.
closes jupyter/nbconvert#103