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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top