Reputation: 41
Here is my signal handler:
pid_t pid;
int status;
while (pid = waitpid(-1, &status, WNOHANG|WUNTRACED|WCONTINUED))
{
printf("resume? %d\n", WIFCONTINUED(status));
}
It always prints out 0 even if I send a SIGCONT
to a child process. If I send a SIGCONT
to a group of processes using killpg
, some processes are indicated to be resumed but some are not. Could somebody tell me why this happened?
Upvotes: 1
Views: 437
Reputation: 409482
The SIGCHLD
signal is only if a child has stopped or terminated, not when execution resumes.
Upvotes: 1