diff options
author | stoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-18 19:00:41 +0000 |
---|---|---|
committer | stoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-18 19:00:41 +0000 |
commit | 9e12993841df10f0489be312cf5d4e705b4a1a15 (patch) | |
tree | ce4d9e3199f8d8ccf671a42d64f961a88b5b99bf /threadproc | |
parent | ed72e0cefca5a451e62b3610bccb86bf5ef7b446 (diff) | |
download | libapr-9e12993841df10f0489be312cf5d4e705b4a1a15.tar.gz |
Win32: WAIT_ABANDONED should be treated as a success. WAIT_FAILED (the only
other possible return code) should call GetLastError, canonicalize it then
return that as apr_status
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64540 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/win32/thread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c index 7d48228da..bbc08d2fb 100644 --- a/threadproc/win32/thread.c +++ b/threadproc/win32/thread.c @@ -167,15 +167,15 @@ APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval, apr_thread_t *thd) { - apr_status_t stat; + apr_status_t rv; - if ((stat = WaitForSingleObject(thd->td, INFINITE)) == WAIT_OBJECT_0) { + rv = WaitForSingleObject(thd->td, INFINITE); + if ( rv == WAIT_OBJECT_0 || rv == WAIT_ABANDONED) { *retval = thd->exitval; return APR_SUCCESS; } - else { - return stat; - } + /* Wait failed */ + return APR_FROM_OS_ERROR(GetLastError()); } APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd) |