[CRIU] [PATCH 5/N] page-server/service: do not chdir / when going daemon

Ruslan Kuprieiev kupruser at gmail.com
Thu Nov 14 17:33:53 PST 2013


We have now -W option to specifie where daemon should go.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-service.c | 2 +-
 page-xfer.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-service.c b/cr-service.c
index a10d07f..65710fd 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -367,7 +367,7 @@ int cr_service(bool daemon_mode)
 	}
 
 	if (daemon_mode) {
-		if (daemon(0, 0) == -1) {
+		if (daemon(1, 0) == -1) {
 			pr_perror("Can't run service server in the background");
 			goto err;
 		}
diff --git a/page-xfer.c b/page-xfer.c
index 8ace824..df4db31 100644
--- a/page-xfer.c
+++ b/page-xfer.c
@@ -271,7 +271,7 @@ int cr_page_server(bool daemon_mode)
 	}
 
 	if (daemon_mode)
-		if(daemon(0, 0) == -1){
+		if (daemon(1, 0) == -1) {
 			pr_perror("Can't run in the background");
 			return -errno;
 		}
-- 
1.8.1.2



More information about the CRIU mailing list