diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-27 09:09:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-27 09:09:53 +0200 |
commit | dfa2cdb15db5a28045b7fa76ea871a3b7b6d02a8 (patch) | |
tree | eea3ce7d3ae130b471d8ec916ee5d707745ee440 | |
parent | cpukit: refactor nanosleep and use 64-bit timeout for threadq (diff) | |
download | rtems-dfa2cdb15db5a28045b7fa76ea871a3b7b6d02a8.tar.bz2 |
posix: Fix error status
-rw-r--r-- | cpukit/posix/src/nanosleep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index 2c7f9fa900..779dc20b84 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -136,8 +136,9 @@ int nanosleep( * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ - if ( !_Timespec_Is_valid( rqtp ) ) - return EINVAL; + if ( !_Timespec_Is_valid( rqtp ) ) { + rtems_set_errno_and_return_minus_one( EINVAL ); + } relative_interval = _Timespec_To_ticks( rqtp ); if ( relative_interval == 0 ) |