From 7e9b080575fd68c788c33623594ba5516fa7ceb0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 23 Dec 2012 09:45:07 +0100 Subject: nscd: don't fork twice --- nscd/nscd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nscd/nscd.c b/nscd/nscd.c index 26cf3c2692..ffbc6f8bc9 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -252,15 +252,6 @@ main (int argc, char **argv) for (i = min_close_fd; i < getdtablesize (); i++) close (i); - if (run_mode == RUN_DAEMONIZE) - { - pid = fork (); - if (pid == -1) - error (EXIT_FAILURE, errno, _("cannot fork")); - if (pid != 0) - exit (0); - } - setsid (); if (chdir ("/") != 0) -- cgit v1.2.3