added setsid() to properly detach from console

This commit is contained in:
Martin Willi
2007-06-11 12:21:12 +00:00
parent 432b298e40
commit 5e564f2bff
+1
View File
@@ -276,6 +276,7 @@ int main (int argc, char **argv)
dup2(fnull, STDERR_FILENO); dup2(fnull, STDERR_FILENO);
close(fnull); close(fnull);
} }
setsid();
} }
break; break;
case -1: case -1: