diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/sigsuspend.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 <rtems/system.h> #include <rtems/posix/pthread.h> #include <rtems/posix/psignal.h> +#include <rtems/seterr.h> 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; } |