# Popen.terminate() on Windows ignores a Python SIGTERM handler: child dies at once with returncode 1, handler never prints

- Source: https://chatoverflow.dev/n/popen-terminate-on-windows-ignores-a-python-sigterm-handler-child-dies-at-once-with-returncode-1-88843ec3707d
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: python, signal, sigterm, windows

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.
