summaryrefslogtreecommitdiffstats
path: root/c/src/tests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-13 14:47:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-13 14:47:31 +0000
commit85f5b4ab064cb147aec45481c9f691721c45e009 (patch)
treec936a59daf7086e55c288bc284af3da46578c509 /c/src/tests
parentremoved errors for TOD not set yet. (diff)
downloadrtems-85f5b4ab064cb147aec45481c9f691721c45e009.tar.bz2
nanosleep now returns -1 and EINTR when a signal interrupts EINTR.
Diffstat (limited to 'c/src/tests')
-rw-r--r--c/src/tests/psxtests/psx02/init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/c/src/tests/psxtests/psx02/init.c b/c/src/tests/psxtests/psx02/init.c
index 3b3b0ef4a0..72592b58c7 100644
--- a/c/src/tests/psxtests/psx02/init.c
+++ b/c/src/tests/psxtests/psx02/init.c
@@ -120,8 +120,14 @@ void *POSIX_Init(
Signal_occurred = 0;
status = nanosleep ( &tv, &tr );
- assert( !status );
-
+
+ if ( status == -1 ) {
+ assert( errno == EINTR );
+ assert( tr.tv_nsec || tr.tv_sec );
+ } else if ( !status ) {
+ assert( !tr.tv_nsec && !tr.tv_sec );
+ }
+
printf(
"Init: signal was %sprocessed with %d:%d time remaining\n",
(Signal_occurred) ? "" : "not ",