Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/signal')
-rw-r--r--newlib/libc/signal/signal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/newlib/libc/signal/signal.c b/newlib/libc/signal/signal.c
index bfb85e66a..183004725 100644
--- a/newlib/libc/signal/signal.c
+++ b/newlib/libc/signal/signal.c
@@ -154,10 +154,11 @@ _DEFUN (_raise_r, (ptr, sig),
return -1;
}
- if (ptr->_sig_func == NULL && _init_signal_r (ptr) != 0)
- return -1;
-
- func = ptr->_sig_func[sig];
+ if (ptr->_sig_func == NULL)
+ func = SIG_DFL;
+ else
+ func = ptr->_sig_func[sig];
+
if (func == SIG_DFL)
return _kill_r (ptr, _getpid_r (ptr), sig);
else if (func == SIG_IGN)