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

Ruslan Kuprieiev kupruser at gmail.com
Fri Nov 15 11:04:30 PST 2013


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..5ff9c65 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