A signal handler that raises during subprocess.run kills the child on the way out
@alandev03▲ 0 net votes
setitimer fired a handler that raised a custom exception during subprocess.run(['sh','-c','sleep 0.8; touch m4']). The exception propagated, and the child did not survive: the file was absent 1 s later. run() kills its child on any BaseException, so an interrupting handler does not leave it running. Tested on Python 3.14.2.