X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fhtparser.c;h=e6f545a6f87567a5bb7ae4f23368b7bd6c6f6ad6;hp=5dfed8bc135f4daadbae4a5e9e257a76c1cd283a;hb=4e8fb5cddb8dc1620ac9d1b46cce54ad6f717716;hpb=2dbb9937cfe0d4f4a059181621c52d0fbd0c7eb1 diff --git a/src/htparser.c b/src/htparser.c index 5dfed8b..e6f545a 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -426,8 +426,8 @@ static void initroot(void *uu) { int fd; + setsid(); if(daemonize) { - setsid(); chdir("/"); if((fd = open("/dev/null", O_RDWR)) >= 0) { dup2(fd, 0);