Handling multiple SIGCHLD

后端 未结 2 1618
迷失自我
迷失自我 2020-11-27 16:21

In a system running Linux 2.6.35+ my program creates many child processes and monitors them. If a child process dies I do some clean-up and spawn the process again. I use <

2条回答
  •  一向
    一向 (楼主)
    2020-11-27 16:48

    Actually the hassle-free way would be the waitfd functionally that would allow you to add a specific pid to poll()/epoll(). Unfortunately, it wasn't accepted to Linux years ago when it was proposed.

提交回复
热议问题