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 'winsup/cygwin/signal.cc')
-rw-r--r--winsup/cygwin/signal.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 61535fff3..ea4a4394a 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -46,7 +46,7 @@ signal (int sig, _sig_func_ptr func)
_sig_func_ptr prev;
/* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
+ if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
{
set_errno (EINVAL);
syscall_printf ("SIG_ERR = signal (%d, %p)", sig, func);
@@ -260,7 +260,7 @@ sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
if (newact)
{
- if ((sig == SIGKILL || sig == SIGSTOP) && newact->sa_handler != SIG_DFL)
+ if (sig == SIGKILL || sig == SIGSTOP)
{
set_errno (EINVAL);
return -1;