HomeFreeBSD

timeout(1): only start the child command after the parent is fully set up

Description

timeout(1): only start the child command after the parent is fully set up

Since the default disposition for SIGCHLD is ignore, the prematurely
exited child would cause SIGCHLD dropped. This makes timeout(1) hang,
because REAP_STATUS reports a zombie not waited for, but SIGCHLD for it
was already lost, so the main loop cannot exit, instead calling into
sigsuspend().

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50752

Details

Provenance
kibAuthored on Jun 8 2025, 3:47 PM
Reviewer
markj
Differential Revision
D50752: Fixes for timeout(1)
Parents
rGbff05e8a8c3c: timeout(1): print errno when signalling syscalls failed
Branches
Unknown
Tags
Unknown