diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-03 11:09:20 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-03 11:09:20 +0000 |
commit | 7d347f9ff68a1f3c7594c1239de4c6cf3e298100 (patch) | |
tree | 3e4c8eb6fa51d1d354349803e15aa72e0c8e874c /lib/librthread | |
parent | a10efd334432404bd73ff8ce50fbf836b4fe8c78 (diff) |
sem_timedwait() should return ETIMEDOUT instead of EWOULDBLOCK on timeout
Diffstat (limited to 'lib/librthread')
-rw-r--r-- | lib/librthread/rthread_sem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_sem.c b/lib/librthread/rthread_sem.c index 39eb4a0f684..40b24a1122f 100644 --- a/lib/librthread/rthread_sem.c +++ b/lib/librthread/rthread_sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sem.c,v 1.6 2012/03/03 10:02:26 guenther Exp $ */ +/* $OpenBSD: rthread_sem.c,v 1.7 2012/03/03 11:09:19 guenther Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -198,7 +198,7 @@ sem_timedwait(sem_t *semp, const struct timespec *abstime) _leave_delayed_cancel(self, r); if (r) { - errno = r; + errno = r == EWOULDBLOCK ? ETIMEDOUT : r; return (-1); } |