[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: Updating svn.collab.net

From: Bill Tutt <billtut_at_microsoft.com>
Date: 2001-09-19 22:55:46 CEST

Here's the Win32 patch, who's going to do the Unix one? :)

Bill

Index: proc.c
===================================================================
RCS file: /home/cvspublic/apr/threadproc/win32/proc.c,v
retrieving revision 1.47
diff -u -r1.47 proc.c
--- proc.c 2001/07/13 13:37:24 1.47
+++ proc.c 2001/09/19 20:48:20
@@ -471,27 +471,35 @@
     return apr_get_os_error();
 }
 
-APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e wait)
+APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc, apr_wait_t
*status,
+ apr_wait_how_e wait)
 {
     DWORD stat;
+ DWORD time;
+
     if (!proc)
         return APR_ENOPROC;
+
     if (wait == APR_WAIT) {
- if ((stat = WaitForSingleObject((HANDLE)proc->pid,
- INFINITE)) == WAIT_OBJECT_0) {
- return APR_CHILD_DONE;
- }
- else if (stat == WAIT_TIMEOUT) {
- return APR_CHILD_NOTDONE;
+ time = INFINITE;
+ }
+ else {
+ time = 0;
+ }
+
+ if ((stat = WaitForSingleObject((HANDLE)proc->pid,
+ time)) == WAIT_OBJECT_0) {
+ if (GetExitCodeProcess((HANDLE)proc->pid,
+ &stat)) {
+ *status = (apr_wait_t)stat;
+ return APR_CHILD_DONE;
         }
         return GetLastError();
     }
- if ((stat = WaitForSingleObject((HANDLE)proc->pid, 0)) ==
WAIT_OBJECT_0) {
- return APR_CHILD_DONE;
- }
     else if (stat == WAIT_TIMEOUT) {
         return APR_CHILD_NOTDONE;
     }
+
     return GetLastError();
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.