mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 00:02:44 +00:00
o Now when SIG_IGN signal action for SIGCHLD reap zombies
automatically it is possible wait4(2) returns -1 and sets errno = ECHILD if there were forked children. A user can set such signal handler e.g. via ``trap "" 20'', see a PR for the test case. Deal with this case and mark a job as JOBDONE. PR: bin/90334 Submitted by: bde MFC after: 4 weeks
This commit is contained in:
parent
59a269294f
commit
19d099fc86
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153417
@ -924,6 +924,8 @@ dowait(int block, struct job *job)
|
||||
} while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) ||
|
||||
(pid > 0 && WIFSTOPPED(status) && !iflag));
|
||||
in_dowait--;
|
||||
if (pid == -1 && errno == ECHILD && job != NULL)
|
||||
job->state = JOBDONE;
|
||||
if (breakwaitcmd != 0) {
|
||||
breakwaitcmd = 0;
|
||||
if (pid <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user