From: Andre Noll Date: Tue, 14 Jun 2016 08:40:22 +0000 (+0200) Subject: daemon: Do not change to /. X-Git-Tag: v0.1.7~8 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=7da9a331fbbfb10a35fd9d014c47edbad13ffed7;hp=1c6346c95e20aaff69e27ecb6deacbd496000dca daemon: Do not change to /. This is pointless because we immediately cd back into the destination dir anyway. --- 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)