Merge pull request #440 from stoeckmann/vipw
Improve child error handling
This commit is contained in:
commit
3ff3cd9c78
@ -349,6 +349,9 @@ vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (void))
|
|||||||
sigprocmask(SIG_BLOCK, &mask, &omask);
|
sigprocmask(SIG_BLOCK, &mask, &omask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set SIGCHLD to default for waitpid */
|
||||||
|
signal(SIGCHLD, SIG_DFL);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
pid = waitpid (pid, &status, WUNTRACED);
|
pid = waitpid (pid, &status, WUNTRACED);
|
||||||
if ((pid != -1) && (WIFSTOPPED (status) != 0)) {
|
if ((pid != -1) && (WIFSTOPPED (status) != 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user