From 7da9a331fbbfb10a35fd9d014c47edbad13ffed7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 14 Jun 2016 10:40:22 +0200 Subject: [PATCH 1/1] daemon: Do not change to /. This is pointless because we immediately cd back into the destination dir anyway. --- daemon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/daemon.c b/daemon.c index 24bbfe5..86e8906 100644 --- a/daemon.c +++ b/daemon.c @@ -45,8 +45,6 @@ void daemon_init(void) /* become session leader */ if (setsid() < 0) goto err; - if (chdir("/") < 0) - goto err; umask(0); null = open("/dev/null", O_RDWR); if (null < 0) -- 2.39.2