[CRIU] [PATCH 1/2] page-server: don't return a server pid from page-server

Andrei Vagin avagin at openvz.org
Wed Feb 1 20:46:37 PST 2017


From: Andrei Vagin <avagin at virtuozzo.com>

This patch fixes an exit code if a page-server is started
as a daemon. Now the criu exits with a pid of a page server,
it's meaningless, because pid is usually bigger than 128.

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 criu/page-xfer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index 1f0102e..d74c324 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -931,7 +931,7 @@ int cr_page_server(bool daemon_mode, bool lazy_dump, int cfd)
 no_server:
 	ret = run_tcp_server(daemon_mode, &ask, cfd, sk);
 	if (ret != 0)
-		return ret;
+		return ret > 0 ? 0 : -1;
 
 	if (ask >= 0)
 		ret = page_server_serve(ask);
-- 
2.7.4



More information about the CRIU mailing list