- /* block a few signals */
- sigemptyset(&set);
- sigaddset(&set, SIGHUP);
- sigaddset(&set, SIGINT);
- sigaddset(&set, SIGQUIT);
- sigaddset(&set, SIGTERM);
- sigprocmask(SIG_BLOCK, &set, &oset);
-
- while (wait(&status) != NOTOK) {
- pidcheck(status);
- continue;
- }
-
- /* reset the signal mask */
- sigprocmask(SIG_SETMASK, &oset, &set);
-
- xpid = 0;