[CRIU] [PATCH] zdtm/sigpending: wait a child before C/R

Andrey Vagin avagin at openvz.org
Tue Dec 22 03:55:44 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm/live/static/sigpending.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/zdtm/live/static/sigpending.c b/test/zdtm/live/static/sigpending.c
index b0b7f8c..2a4abfb 100644
--- a/test/zdtm/live/static/sigpending.c
+++ b/test/zdtm/live/static/sigpending.c
@@ -6,6 +6,7 @@
 #include <pthread.h>
 #include <string.h>
 #include <limits.h>
+#include <sys/wait.h>
 
 #include "zdtmtst.h"
 
@@ -208,6 +209,10 @@ int main(int argc, char ** argv)
 
 	if(child == 0)
 		return 5; /* SIGCHLD */
+	if (waitid(P_PID, child, NULL, WNOWAIT | WEXITED)) {
+		pr_perror("waitid");
+		return 1;
+	}
 
 	sent_sigs++;
 
-- 
2.4.3



More information about the CRIU mailing list