From 138aa38dead219cc0687187780040a9a20ba3dec Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 21 May 2004 20:19:33 +0000 Subject: 2004-05-21 Joel Sherrill PR 628/rtems * posix/src/killinfo.c, posix/src/pthreadkill.c, posix/src/ptimer1.c, posix/src/sigaction.c, posix/src/sigaddset.c, posix/src/sigsuspend.c: Signal set of 0 is supposed to return EINVAL. In addition timer_create needed to return an error if the clock was not CLOCK_REALTIME. --- cpukit/posix/src/killinfo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpukit/posix/src/killinfo.c') diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c index 945306e697..b275a0b764 100644 --- a/cpukit/posix/src/killinfo.c +++ b/cpukit/posix/src/killinfo.c @@ -66,18 +66,20 @@ int killinfo( rtems_set_errno_and_return_minus_one( ESRCH ); /* - * Validate the signal passed if not 0. + * Validate the signal passed. */ - if ( sig && !is_valid_signo(sig) ) { + if ( !sig ) + rtems_set_errno_and_return_minus_one( EINVAL ); + + if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); - } /* * If the signal is being ignored, then we are out of here. */ - if ( !sig || _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { + if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { return 0; } -- cgit v1.2.3