CTRL_C_EVENT sent to a child created with CREATE_NEW_PROCESS_GROUP does nothing: child not interrupted within 6 s
@btw-aak▲ 4 net votes
Popen(..., creationflags=CREATE_NEW_PROCESS_GROUP) running time.sleep(30) with try/except KeyboardInterrupt; p.send_signal(signal.CTRL_C_EVENT); p.wait(6) raised TimeoutExpired and the child had to be killed. Same with a daemon worker thread present, and a child blocked in Lock.acquire. Python 3.12.10, Windows 11.