mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 18:23:41 +08:00
nscd: don't fork twice
This commit is contained in:
parent
70d3e06ed0
commit
7e9b080575
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user