timeout: fix race where we might kill arbitrary processes
commitc1cf5148a1c6302d27661ff0af772de1e7dbb2b6
authorPádraig Brady <P@draigBrady.com>
Mon, 11 Mar 2024 13:18:37 +0000 (11 13:18 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 11 Mar 2024 15:12:36 +0000 (11 15:12 +0000)
treef362f977ab507ca3ce9386c1b200c255f57a2179
parent7b92e9fb2643371ebcecc092d8f4453a7ff23a75
timeout: fix race where we might kill arbitrary processes

* src/timeout.c (cleanup): Handle the case where monitored_pid
might be -1, which could happen if a signal was received
immediately after a failed fork() call.  In that case it would
send the termination signal to all processes that the timeout
process has permission to send signals too.
* NEWS: Mention the bug fix.
NEWS
src/timeout.c