Given the following code:
try:
subprocess.Popen(ExternalProcess, stdout=subprocess.PIPE,stderr=subprocess.PIPE, shell=True).communicate()
except KeyboardInterrupt:
exit(0)
If during the execution of ExternalProcess
(which is not a python script) one presses the Ctrl+C command, what exactly is going on?
Can I be sure for a 100% that in this scope, if I press the Ctrl+C, it will always get into the 'except' even if it happens during the execution of ExternalProcess
?
Or it depends on how the external process deals with it?