简体   繁体   English

子恢复时未发出SIGCHLD信号

[英]SIGCHLD signal does not issued when child resume

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. 即使我将SIGCONT发送到子进程,它也始终打印出0。 If I send a SIGCONT to a group of processes using killpg , some processes are indicated to be resumed but some are not. 如果我使用killpgSIGCONT发送到一组进程,则表明某些进程可以恢复,但有些则不能。 Could somebody tell me why this happened? 有人可以告诉我为什么会这样吗?

SIGCHLD信号仅在子项已停止或终止时才显示,而在执行恢复时不显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM