* signal.cc (sigaction): Ditto
* syscalls.cc (_lseek): Return EINVAL on invalid input
+2001-02-16 Egor Duda <deo@logos-m.ru>
+
+ * signal.cc (signal): Prohibit setting handlers for SIGKILL and
+ SIGSTOP
+ * signal.cc (sigaction): Ditto
+ * syscalls.cc (_lseek): Return EINVAL on invalid input
+
Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
* dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
_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);
if (newact)
{
- if ((sig == SIGKILL || sig == SIGSTOP) && newact->sa_handler != SIG_DFL)
+ if (sig == SIGKILL || sig == SIGSTOP)
{
set_errno (EINVAL);
return -1;
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;