patches/glibc/2.9/360-2.8-nscd-one-fork.patch
author Arnaud Lacombe <lacombar@gmail.com>
Thu Aug 05 17:59:51 2010 +0200 (2010-08-05)
changeset 2069 366bd2b22675
parent 1201 c9967a6e3b25
permissions -rw-r--r--
complibs/mpc: fix MPC 0.8.1 build with MPFR 3.0.0

This is the change introduced by revision 734 of MPC repository.

Author: Paul Zimmermann <Paul.Zimmermann@loria.fr>
Revision log: [acos.c] fixed problem with GMP_RNDA (should be MPFR_RNDA, and code was wrong)

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
     1 Original patch from: gentoo/src/patchsets/glibc/2.9/1160_all_glibc-2.8-nscd-one-fork.patch
     2 
     3 -= BEGIN original header =-
     4 only fork one to assist in stop-start-daemon assumptions about daemon behavior
     5 
     6 http://bugs.gentoo.org/190785
     7 
     8 -= END original header =-
     9 
    10 diff -durN glibc-2_9.orig/nscd/nscd.c glibc-2_9/nscd/nscd.c
    11 --- glibc-2_9.orig/nscd/nscd.c	2008-03-29 19:08:12.000000000 +0100
    12 +++ glibc-2_9/nscd/nscd.c	2009-02-02 22:01:10.000000000 +0100
    13 @@ -179,6 +179,9 @@
    14        if (pid != 0)
    15  	exit (0);
    16  
    17 +       if (write_pid (_PATH_NSCDPID) < 0)
    18 +	dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
    19 +
    20        int nullfd = open (_PATH_DEVNULL, O_RDWR);
    21        if (nullfd != -1)
    22  	{
    23 @@ -228,12 +231,6 @@
    24  	for (i = min_close_fd; i < getdtablesize (); i++)
    25  	  close (i);
    26  
    27 -      pid = fork ();
    28 -      if (pid == -1)
    29 -	error (EXIT_FAILURE, errno, _("cannot fork"));
    30 -      if (pid != 0)
    31 -	exit (0);
    32 -
    33        setsid ();
    34  
    35        if (chdir ("/") != 0)
    36 @@ -242,9 +239,6 @@
    37  
    38        openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);
    39  
    40 -      if (write_pid (_PATH_NSCDPID) < 0)
    41 -        dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
    42 -
    43        if (!init_logfile ())
    44  	dbg_log (_("Could not create log file"));
    45