dreid 01/01/10 11:34:37
Modified: threadproc/beos proc.c
Log:
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 <[EMAIL PROTECTED]>
Revision Changes Path
1.35 +6 -7 apr/threadproc/beos/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/beos/proc.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- proc.c 2000/11/26 02:03:10 1.34
+++ proc.c 2001/01/10 19:34:35 1.35
@@ -300,22 +300,21 @@
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_limit(apr_procattr_t *attr, apr_int32_t what,
- struct rlimit *limit)
+ void *limit)
{
return APR_ENOTIMPL;
}