[CRIU] [PATCH v4 1/3] criu service: support status-fd

Adrian Reber adrian at lisas.de
Thu Jun 28 12:03:55 MSK 2018


From: Adrian Reber <areber at redhat.com>

Make the --status-fd option also work in 'criu service' mode to avoid
race conditions during testing.

Signed-off-by: Adrian Reber <areber at redhat.com>
---
 criu/cr-service.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/criu/cr-service.c b/criu/cr-service.c
index 274ff21..3a07d5b 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;
 
-- 
1.8.3.1



More information about the CRIU mailing list