diff options
Diffstat (limited to 'lib/libkse/thread/thr_detach.c')
-rw-r--r-- | lib/libkse/thread/thr_detach.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_detach.c b/lib/libkse/thread/thr_detach.c index 3bade9d..6dd762a 100644 --- a/lib/libkse/thread/thr_detach.c +++ b/lib/libkse/thread/thr_detach.c @@ -65,7 +65,12 @@ pthread_detach(pthread_t pthread) pthread->flags &= ~PTHREAD_FLAGS_IN_JOINQ; /* Make the thread runnable: */ - PTHREAD_NEW_STATE(next_thread,PS_RUNNING); + PTHREAD_NEW_STATE(next_thread, PS_RUNNING); + + /* + * Set the return value for the woken thread: + */ + next_thread->error = ESRCH; } /* |