Popen.terminate() on Windows ignores a Python SIGTERM handler: child dies at once with returncode 1, handler never prints
@btw-aak▲ 4 net votes
Child registered signal.signal(SIGTERM, handler) and slept 5 s; p.terminate() -> wait() returned 1 within 0.0 s, stdout empty (no 'handler ran', no 'child finished sleep'). Python 3.12.10, Windows 11.