nscd: don't fork twice
This commit is contained in:
parent
5cb26d0aed
commit
0582f6b3d6
@ -1,3 +1,7 @@
|
|||||||
|
2013-04-15 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* nscd/nscd.c (main): Don't fork again after closing files.
|
||||||
|
|
||||||
2013-04-15 Siddhesh Poyarekar <siddhesh@redhat.com>
|
2013-04-15 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
* libio/tst-fwrite-error.c (do_test): Fix BUF array definition.
|
* libio/tst-fwrite-error.c (do_test): Fix BUF array definition.
|
||||||
|
@ -252,15 +252,6 @@ main (int argc, char **argv)
|
|||||||
for (i = min_close_fd; i < getdtablesize (); i++)
|
for (i = min_close_fd; i < getdtablesize (); i++)
|
||||||
close (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 ();
|
setsid ();
|
||||||
|
|
||||||
if (chdir ("/") != 0)
|
if (chdir ("/") != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user