hrev46503 adds 1 changeset to branch 'master' old head: 03765c1d99e3ea50d86c8a26e882a5b25b86701d new head: 57d8dd92ef5261d4fc17c6b4b0d756839407524b overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=57d8dd9+%5E03765c1 ---------------------------------------------------------------------------- 57d8dd9: pthread_join: Retry when interrupted as mandated by POSIX. The spec explicitly states that pthread_join shall not return EINTR, so we have to retry the wait when it gets interrupted instead of letting the error code through. [ Michael Lotz <mmlr@xxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev46503 Commit: 57d8dd92ef5261d4fc17c6b4b0d756839407524b URL: http://cgit.haiku-os.org/haiku/commit/?id=57d8dd9 Author: Michael Lotz <mmlr@xxxxxxxx> Date: Sun Dec 1 08:32:24 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 5 insertions(+), 1 deletion(-) src/system/libroot/posix/pthread/pthread.cpp | 6 +++++- ---------------------------------------------------------------------------- diff --git a/src/system/libroot/posix/pthread/pthread.cpp b/src/system/libroot/posix/pthread/pthread.cpp index 1e7c4e9..6c441e1 100644 --- a/src/system/libroot/posix/pthread/pthread.cpp +++ b/src/system/libroot/posix/pthread/pthread.cpp @@ -189,7 +189,11 @@ int pthread_join(pthread_t thread, void** _value) { status_t dummy; - status_t error = wait_for_thread(thread->id, &dummy); + status_t error; + do { + error = wait_for_thread(thread->id, &dummy); + } while (error == B_INTERRUPTED); + if (error == B_BAD_THREAD_ID) RETURN_AND_TEST_CANCEL(ESRCH);