* signal.cc (signal): Prohibit setting handlers for SIGKILL and SIGSTOP

* signal.cc (sigaction): Ditto
* syscalls.cc (_lseek): Return EINVAL on invalid input
This commit is contained in:
Egor Duda
2001-02-16 18:49:20 +00:00
parent 00aae5a740
commit fc68bf34bb
3 changed files with 15 additions and 3 deletions

View File

@@ -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;