summaryrefslogtreecommitdiff
path: root/cpukit/posix/src/sigtimedwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/sigtimedwait.c')
-rw-r--r--cpukit/posix/src/sigtimedwait.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index 311e6cc90a..f095e323ba 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -63,16 +63,21 @@ int sigtimedwait(
/*
* Error check parameters before disabling interrupts.
+ *
+ * NOTE: This is very specifically a RELATIVE not ABSOLUTE time
+ * in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
- if ( !_Timespec_Is_valid( timeout ) ) {
+ if ( !_Timespec_Is_valid( timeout ) )
rtems_set_errno_and_return_minus_one( EINVAL );
- }
interval = _Timespec_To_ticks( timeout );
+
+ if ( !interval )
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/*