Skip to content

Commit

Permalink
Merge pull request shadow-maint#440 from stoeckmann/vipw
Browse files Browse the repository at this point in the history
Improve child error handling
  • Loading branch information
hallyn authored Nov 22, 2021
2 parents 3a0160b + 624d57c commit 3ff3cd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vipw.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (void))
sigprocmask(SIG_BLOCK, &mask, &omask);
}

/* set SIGCHLD to default for waitpid */
signal(SIGCHLD, SIG_DFL);

for (;;) {
pid = waitpid (pid, &status, WUNTRACED);
if ((pid != -1) && (WIFSTOPPED (status) != 0)) {
Expand Down

0 comments on commit 3ff3cd9

Please sign in to comment.