diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-10 19:34:35 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-10 19:34:35 +0000 |
commit | b9e8a5465f6115f1bb32d3ebdd26e3d81d7f0864 (patch) | |
tree | 8c98787f423e6f22460e12e3db839aac09232d81 /threadproc | |
parent | 398a2c566eafe4d177f6df9011d15ebf9fa84d9b (diff) | |
download | libapr-b9e8a5465f6115f1bb32d3ebdd26e3d81d7f0864.tar.gz |
Adjust the way we look for dead threads after Carlos Hasan's suggestion
and a few items of general tidy up.
Submitted by: Carlos Hasan <chasan@acm.org>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61042 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/beos/proc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c index 0a75d43cc..b15f0eb81 100644 --- a/threadproc/beos/proc.c +++ b/threadproc/beos/proc.c @@ -300,22 +300,21 @@ apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_status_t apr_wait_proc(apr_proc_t *proc, apr_wait_how_e wait) { - status_t exitval; - thread_info tinfo; - + status_t exitval, rv; + if (!proc) return APR_ENOPROC; /* when we run processes we are actually running threads, so here we'll wait on the thread dying... */ if (wait == APR_WAIT) { - if (wait_for_thread(proc->pid, &exitval) == B_OK) { + if ((rv = wait_for_thread(proc->pid, &exitval)) == B_OK) { return APR_CHILD_DONE; } - return errno; + return rv; } /* if the thread is still alive then it's not done... this won't hang or holdup the thread checking... */ - if (get_thread_info(proc->pid, &tinfo) == B_BAD_VALUE) { + if (resume_thread(proc->pid) == B_BAD_THREAD_ID) { return APR_CHILD_DONE; } /* if we get this far it's still going... */ @@ -368,7 +367,7 @@ apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_er } apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what, - struct rlimit *limit) + void *limit) { return APR_ENOTIMPL; } |