From 2376c18714fe197fbf56a19f8271e5f256ec7caf Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 7 Jul 2013 08:58:10 -0400 Subject: In select extension, if lacking sigaction, reset signal handler each time a signal is trapped. --- extension/select.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'extension/select.c') diff --git a/extension/select.c b/extension/select.c index 3bcef166..072a562f 100644 --- a/extension/select.c +++ b/extension/select.c @@ -107,6 +107,15 @@ signal_handler(int signum) */ sigaddset(& caught.mask, signum); caught.flag = 1; +#ifndef HAVE_SIGACTION + /* + * On platforms without sigaction, we do not know how the legacy + * signal API will behave. There does not appear to be an autoconf + * test for whether the signal handler is reset to default each time + * a signal is trapped, so we do this to be safe. + */ + signal(signum, signal_handler); +#endif } static int -- cgit v1.2.3