From cf91aa538e5215bc1981d11d06cb6e6c0c221c22 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 27 Dec 2012 08:15:14 +0100 Subject: [PATCH] htparser: Put root handler in a new session regardless of daemonization. --- src/htparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htparser.c b/src/htparser.c index c1903b4..766d2f5 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -425,8 +425,8 @@ static void initroot(void *uu) { int fd; + setsid(); if(daemonize) { - setsid(); chdir("/"); if((fd = open("/dev/null", O_RDWR)) >= 0) { dup2(fd, 0); -- 2.11.0