mirror of git://sourceware.org/git/glibc.git
Update.
2004-02-20 Thorsten Kukuk <kukuk@suse.de> * nscd/nscd.c (termination_handler): Use _exit instead of exit * nscd/nscd.c (main): Report fork errors.
This commit is contained in:
parent
a461b14777
commit
230c3e1e54
|
@ -1,5 +1,11 @@
|
||||||
|
2004-02-20 Thorsten Kukuk <kukuk@suse.de>
|
||||||
|
|
||||||
|
* nscd/nscd.c (termination_handler): Use _exit instead of exit
|
||||||
|
|
||||||
2004-02-20 Ulrich Drepper <drepper@redhat.com>
|
2004-02-20 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nscd/nscd.c (main): Report fork errors.
|
||||||
|
|
||||||
* dlfcn/dlsym.c: Get ld.so loading lock before the call into ld.so.
|
* dlfcn/dlsym.c: Get ld.so loading lock before the call into ld.so.
|
||||||
* dlfcn/dlvsym.c: Likewise.
|
* dlfcn/dlvsym.c: Likewise.
|
||||||
* elf/dl-addr.c: Get loading lock while using _dl_loaded data.
|
* elf/dl-addr.c: Get loading lock while using _dl_loaded data.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Look up a symbol in a shared object loaded by `dlopen'.
|
/* Look up a symbol in a shared object loaded by `dlopen'.
|
||||||
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -89,7 +89,7 @@ RTLD_NEXT used in code not dynamically loaded"));
|
||||||
#if defined USE_TLS && defined SHARED
|
#if defined USE_TLS && defined SHARED
|
||||||
if (ELFW(ST_TYPE) (ref->st_info) == STT_TLS)
|
if (ELFW(ST_TYPE) (ref->st_info) == STT_TLS)
|
||||||
/* The found symbol is a thread-local storage variable.
|
/* The found symbol is a thread-local storage variable.
|
||||||
Return the address for to the current thread. */
|
Return the address for the current thread. */
|
||||||
return _dl_tls_symaddr (result, ref);
|
return _dl_tls_symaddr (result, ref);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
16
nscd/nscd.c
16
nscd/nscd.c
|
@ -159,7 +159,10 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (fork ())
|
pid_t pid = fork ();
|
||||||
|
if (pid == -1)
|
||||||
|
error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||||
|
if (pid != 0)
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
int nullfd = open (_PATH_DEVNULL, O_RDWR);
|
int nullfd = open (_PATH_DEVNULL, O_RDWR);
|
||||||
|
@ -211,7 +214,10 @@ 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 (fork ())
|
pid = fork ();
|
||||||
|
if (pid == -1)
|
||||||
|
error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||||
|
if (pid != 0)
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
setsid ();
|
setsid ();
|
||||||
|
@ -237,7 +243,7 @@ main (int argc, char **argv)
|
||||||
signal (SIGTERM, termination_handler);
|
signal (SIGTERM, termination_handler);
|
||||||
signal (SIGPIPE, SIG_IGN);
|
signal (SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
/* Cleanup files created by a previous `bind'. */
|
/* Cleanup files created by a previous 'bind'. */
|
||||||
unlink (_PATH_NSCDSOCKET);
|
unlink (_PATH_NSCDSOCKET);
|
||||||
|
|
||||||
/* Make sure we do not get recursive calls. */
|
/* Make sure we do not get recursive calls. */
|
||||||
|
@ -394,13 +400,13 @@ termination_handler (int signum)
|
||||||
{
|
{
|
||||||
close_sockets ();
|
close_sockets ();
|
||||||
|
|
||||||
/* Clean up the file created by `bind'. */
|
/* Clean up the file created by 'bind'. */
|
||||||
unlink (_PATH_NSCDSOCKET);
|
unlink (_PATH_NSCDSOCKET);
|
||||||
|
|
||||||
/* Clean up pid file. */
|
/* Clean up pid file. */
|
||||||
unlink (_PATH_NSCDPID);
|
unlink (_PATH_NSCDPID);
|
||||||
|
|
||||||
exit (EXIT_SUCCESS);
|
_exit (EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns 1 if the process in pid file FILE is running, 0 if not. */
|
/* Returns 1 if the process in pid file FILE is running, 0 if not. */
|
||||||
|
|
Loading…
Reference in New Issue