From ae76eb349efcdaf6be056de39f92574fc95f11c1 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 28 Jun 2018 12:43:27 +0000 Subject: [PATCH] criu service: support status-fd Make the --status-fd option also work in 'criu service' mode to avoid race conditions during testing. Signed-off-by: Adrian Reber Signed-off-by: Andrei Vagin --- criu/cr-service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/criu/cr-service.c b/criu/cr-service.c index 274ff218b..3a07d5b76 100644 --- a/criu/cr-service.c +++ b/criu/cr-service.c @@ -1206,6 +1206,9 @@ int cr_service(bool daemon_mode) if (setup_sigchld_handler()) goto err; + if (close_status_fd()) + return -1; + while (1) { int sk;