diff options
author | Egor Duda <deo@logos-m.ru> | 2001-02-16 18:49:20 +0000 |
---|---|---|
committer | Egor Duda <deo@logos-m.ru> | 2001-02-16 18:49:20 +0000 |
commit | fc68bf34bb2352ce876e5e1173f518d8bdd1573a (patch) | |
tree | f1765af0a32dd49df55e8f882af12065d3158173 /winsup/cygwin/signal.cc | |
parent | 00aae5a7403708895cbfcc34bc115838f73cf11f (diff) | |
download | newlib-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.zip newlib-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.tar.gz newlib-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.tar.bz2 |
* signal.cc (signal): Prohibit setting handlers for SIGKILL and SIGSTOP
* signal.cc (sigaction): Ditto
* syscalls.cc (_lseek): Return EINVAL on invalid input
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 61535ff..ea4a439 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; |