summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sigsuspend.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-05-21 20:19:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-05-21 20:19:33 +0000
commit138aa38dead219cc0687187780040a9a20ba3dec (patch)
tree620f8780e4f7bde3fc7e87762312d42982f20127 /cpukit/posix/src/sigsuspend.c
parent2004-05-21 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-138aa38dead219cc0687187780040a9a20ba3dec.tar.bz2
2004-05-21 Joel Sherrill <joel@OARcorp.com>
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.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/src/sigsuspend.c10
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;
}