* [PATCH] nscd: don't crash if killed early
@ 2011-07-19 12:35 Andreas Schwab
2011-07-19 18:02 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2011-07-19 12:35 UTC (permalink / raw)
To: libc-hacker
2011-07-19 Andreas Schwab <schwab@redhat.com>
* nscd/nscd.c (main): Don't install termination_handler until
after databases are initialized.
---
nscd/nscd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 4894cb2..3522f6b 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -267,9 +267,6 @@ main (int argc, char **argv)
if (selinux_enabled)
nscd_avc_init ();
- signal (SIGINT, termination_handler);
- signal (SIGQUIT, termination_handler);
- signal (SIGTERM, termination_handler);
signal (SIGPIPE, SIG_IGN);
/* Cleanup files created by a previous 'bind'. */
@@ -294,6 +291,10 @@ main (int argc, char **argv)
/* Init databases. */
nscd_init ();
+ signal (SIGINT, termination_handler);
+ signal (SIGQUIT, termination_handler);
+ signal (SIGTERM, termination_handler);
+
/* Handle incoming requests */
start_threads ();
--
1.7.6
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nscd: don't crash if killed early
2011-07-19 12:35 [PATCH] nscd: don't crash if killed early Andreas Schwab
@ 2011-07-19 18:02 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2011-07-19 18:02 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-hacker
On Tue, Jul 19, 2011 at 08:35, Andreas Schwab <schwab@redhat.com> wrote:
> 2011-07-19 Andreas Schwab <schwab@redhat.com>
>
> * nscd/nscd.c (main): Don't install termination_handler until
> after databases are initialized.
The termination_handler should instead be fixed. Otherwise we might
have everything set up and don't tear everything down because the
signal handler is not installed. If the head NULL pointer the only
problem?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-19 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19 12:35 [PATCH] nscd: don't crash if killed early Andreas Schwab
2011-07-19 18:02 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).