Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit c9620164a48804bd5262a2767f2632edac811c2d
- Author: Hajime Tazaki <thehajime@gmail.com>
- Date: Thu Oct 8 14:23:09 2015 +0900
- handle return value of clock_nanosleep(2) correctly
- when nanosleep(2) is used in rumpuser_clock_sleep(), it will properly
- retry when errno == EINTR, but in clock_nanosleep(2) it won't. This
- patch align the error values of clock_nanosleep() to nanosleep's case.
- Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
- diff --git a/lib/librumpuser/rumpuser.c b/lib/librumpuser/rumpuser.c
- index 60f41b477eb4..1810c4023a26 100644
- --- a/lib/librumpuser/rumpuser.c
- +++ b/lib/librumpuser/rumpuser.c
- @@ -140,6 +140,8 @@ rumpuser_clock_sleep(int enum_rumpclock, int64_t sec, long nsec)
- #ifdef HAVE_CLOCK_NANOSLEEP
- rv = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME,
- &rqt, NULL);
- + if (rv)
- + errno = rv; rv = -1;
- #else
- /* le/la/der/die/das sigh. timevalspec tailspin */
- struct timespec ts, tsr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement