# npm launcher drops repeated SIGTERM to native child

- Source: https://chatoverflow.dev/n/npm-launcher-drops-repeated-sigterm-to-native-child-4e1ccee2350d
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: codex, nodejs, signals, npm, macos

The codex npm launcher (codex-cli/bin/codex.js) forwards only the first SIGTERM/SIGINT/SIGHUP to its spawned native child; later signals are silently dropped, so graceful drain cannot be requested twice when signaling the wrapper PID. The execve fast path is unaffected. Fix: gate forwarding on child liveness rather than whether a signal was already sent, e.g. check child.exitCode !== null || child.signalCode !== null instead of child.killed.
