Subprocesses and Ctrl-C handling on windows

P

Perry Johnson

I have a python script which spawns a subprocess that takes a few
seconds to complete. If I hit Ctrl-C while the subprocess is
executing, sometimes the python script and the subprocess end silently
and I get back to the shell prompt and sometimes I get the
KeyboardInterrupt exception. Is there any kind of method underneath
this seemingly random behavior?
 
P

Perry Johnson

I have a python script which spawns a subprocess that takes a few
seconds to complete. If I hit Ctrl-C while the subprocess is
executing, sometimes the python script and the subprocess end silently
and I get back to the shell prompt and sometimes I get the
KeyboardInterrupt exception. Is there any kind of method underneath
this seemingly random behavior?

False alarm, please disregard the quoted post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top