Commit 2784095a authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm/sigpending: wait a child before C/R

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 097d0618
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <sys/wait.h>
#include "zdtmtst.h" #include "zdtmtst.h"
...@@ -208,6 +209,10 @@ int main(int argc, char ** argv) ...@@ -208,6 +209,10 @@ int main(int argc, char ** argv)
if(child == 0) if(child == 0)
return 5; /* SIGCHLD */ return 5; /* SIGCHLD */
if (waitid(P_PID, child, NULL, WNOWAIT | WEXITED)) {
pr_perror("waitid");
return 1;
}
sent_sigs++; sent_sigs++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment