kern_sigsuspend: rename wchan The existing name "pause" is not most intuitive to guess where the process sleep. exit1(): Ensure that SIGCHLD from reparented child is queued to reaper We have a reaper R and child A with grandchild B. Now, suppose that B already have exited, and that A did not waited on B. When A is exiting, its child B is reparented to R, but its p_ksi was already queued for A. This means that SIGCHLD is not queued to R, it is only marked as pending in bitmap. If other SIGCHLD is queued, we would miss a delivery of the notification for B exiting. Additionally, R does not see siginfo for B. Do not even try to send SIGCHLD if the target is zombie. Only update the ksi state for possible consumption by the reaper. timeout(1): silence warnings for ESRCH It is possible for the child to become zombie and then there is nothing to signal. timeout(1): print errno when signalling syscalls failed 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 not waited for zombie, but SIGCHLD for it was already lost, so the main loop cannot exit returning into sigsuspend(). timeout(1): pass full 32bit error return code from the exited child Switch to use waitid(2) to receive siginfo_t with the complete error code from the exited process. timeout(1) tests: atf_fail requires a reason
Details
Details
- Reviewers
bapt markj - Commits
- rG4078e0d1d6f8: timeout(1) tests: atf_fail requires a reason
rG81ef00125056: timeout(1): pass full 32bit error return code from the exited child
rGaa8cdb7cae7b: timeout(1): only start the child command after the parent is fully set up
rGbff05e8a8c3c: timeout(1): print errno when signalling syscalls failed
rG15e4b8d5ef84: timeout(1): silence warnings for ESRCH
rG8dda34d0ef79: exit1(): Ensure that SIGCHLD from reparented child is queued to reaper
rG2be717b45a33: kern_sigsuspend: rename wchan
rG8226a8b58810: kern_sigsuspend(): style
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable