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/syscalls.cc | |
parent | 00aae5a7403708895cbfcc34bc115838f73cf11f (diff) | |
download | cygnal-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.tar.gz cygnal-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.tar.bz2 cygnal-fc68bf34bb2352ce876e5e1173f518d8bdd1573a.zip |
* 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/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 99e3de7ec..d5bb510ee 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -447,7 +447,12 @@ _lseek (int fd, off_t pos, int dir) off_t res; sigframe thisframe (mainthread); - if (fdtab.not_open (fd)) + if ( dir != SEEK_SET && dir != SEEK_CUR && dir != SEEK_END ) + { + set_errno ( EINVAL ); + res = -1; + } + else if (fdtab.not_open (fd)) { set_errno (EBADF); res = -1; |