Complete proper daemonization by closing std* descriptors.

This fixes install as well as /sbin/services does not hang anymore
This commit is contained in:
Simo Sorce 2007-08-17 12:44:01 -04:00
parent 288128d560
commit 29a8f74fad

View File

@ -891,6 +891,10 @@ int main(int argc, char *argv[])
/* new session */
setsid();
/* close std* descriptors */
close(0);
close(1);
close(2);
/* fork again to make sure we completely detach from parent process */
pid = fork();