projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7490eb8
)
Revert "nscd: don't fork twice"
author
Andreas Schwab
<schwab@suse.de>
Thu, 10 Jan 2013 09:42:49 +0000
(10:42 +0100)
committer
Andreas Schwab
<schwab@suse.de>
Thu, 10 Jan 2013 09:44:04 +0000
(10:44 +0100)
This reverts commit
7e9b080575fd68c788c33623594ba5516fa7ceb0
.
nscd/nscd.c
patch
|
blob
|
history
diff --git
a/nscd/nscd.c
b/nscd/nscd.c
index
ffbc6f8
..
26cf3c2
100644
(file)
--- a/
nscd/nscd.c
+++ b/
nscd/nscd.c
@@
-252,6
+252,15
@@
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)