forked from Imagelibrary/rtems
nanosleep now returns -1 and EINTR when a signal interrupts EINTR.
This commit is contained in:
@@ -120,7 +120,13 @@ void *POSIX_Init(
|
|||||||
Signal_occurred = 0;
|
Signal_occurred = 0;
|
||||||
|
|
||||||
status = nanosleep ( &tv, &tr );
|
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(
|
printf(
|
||||||
"Init: signal was %sprocessed with %d:%d time remaining\n",
|
"Init: signal was %sprocessed with %d:%d time remaining\n",
|
||||||
|
|||||||
@@ -120,7 +120,13 @@ void *POSIX_Init(
|
|||||||
Signal_occurred = 0;
|
Signal_occurred = 0;
|
||||||
|
|
||||||
status = nanosleep ( &tv, &tr );
|
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(
|
printf(
|
||||||
"Init: signal was %sprocessed with %d:%d time remaining\n",
|
"Init: signal was %sprocessed with %d:%d time remaining\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user