[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 23:19:37 CEST

Err, let's try that again with the correct CVS code. *bog*

Used a context diff due to the slight code rearranging.

Duplicated code is bad....

Bill

Index: proc.c
===================================================================
RCS file: /home/cvspublic/apr/threadproc/win32/proc.c,v
retrieving revision 1.55
diff -c -r1.55 proc.c
*** proc.c 2001/09/17 21:24:29 1.55
--- proc.c 2001/09/19 21:00:06
***************
*** 540,566 ****
      return APR_SUCCESS;
  }
  
! APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e wait)
  {
      DWORD stat;
      if (!proc)
          return APR_ENOPROC;
      if (wait == APR_WAIT) {
! if ((stat = WaitForSingleObject(proc->hproc,
! INFINITE)) == WAIT_OBJECT_0) {
! CloseHandle(proc->hproc);
! proc->hproc = NULL;
! return APR_CHILD_DONE;
! }
! else if (stat == WAIT_TIMEOUT) {
! return APR_CHILD_NOTDONE;
          }
          return apr_get_os_error();
- }
- if ((stat = WaitForSingleObject((HANDLE)proc->hproc, 0)) ==
WAIT_OBJECT_0) {
- CloseHandle(proc->hproc);
- proc->hproc = NULL;
- return APR_CHILD_DONE;
      }
      else if (stat == WAIT_TIMEOUT) {
          return APR_CHILD_NOTDONE;
--- 540,571 ----
      return APR_SUCCESS;
  }
  
! 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) {
! time = INFINITE;
! }
! else {
! time = 0;
! }
!
! if ((stat = WaitForSingleObject((HANDLE)proc->hproc,
! time)) == WAIT_OBJECT_0) {
! if (GetExitCodeProcess((HANDLE)proc->pid,
! &stat)) {
! *status = (apr_wait_t)stat;
! CloseHandle(proc->hproc);
! proc->hproc = NULL;
! return APR_CHILD_DONE;
          }
          return apr_get_os_error();
      }
      else if (stat == WAIT_TIMEOUT) {
          return APR_CHILD_NOTDONE;

---------------------------------------------------------------------
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.