projects
/
gapil.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f55168f8aea0b153151696a884f56afc108ab2fc
[gapil.git]
/
listati
/
hand_sigchild.c
1
void HandSigCHLD(int sig)
2
{
3
int errno_save;
4
int status;
5
pid_t pid;
6
/* save errno current value */
7
errno_save = errno;
8
/* loop until no */
9
do {
10
errno = 0;
11
pid = waitpid(WAIT_ANY, &status, WNOHANG);
12
if (pid > 0) {
13
debug("child %d terminated with status %x\n", pid, status);
14
}
15
} while (pid > 0);
16
/* restore errno value */
17
errno = errno_save;
18
/* return */
19
return;
20
}