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/sigsuspend.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/src/sigsuspend.c') diff --git a/cpukit/posix/src/sigsuspend.c b/cpukit/posix/src/sigsuspend.c index aca97a868d..aa330bc71c 100644 --- a/cpukit/posix/src/sigsuspend.c +++ b/cpukit/posix/src/sigsuspend.c @@ -1,7 +1,7 @@ /* * 3.3.7 Wait for a Signal, P1003.1b-1993, p. 75 * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2004. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -21,6 +21,7 @@ #include #include #include +#include int sigsuspend( const sigset_t *sigmask @@ -41,5 +42,12 @@ int sigsuspend( (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); + /* + * sigtimedwait() returns the signal number while sigsuspend() + * is supposed to return -1 and EINTR when a signal is caught. + */ + if ( status != -1 ) + rtems_set_errno_and_return_minus_one( EINTR ); + return status; } -- cgit v1.2.3