You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bj...@locus.apache.org on 2000/07/14 16:20:09 UTC

cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

bjh         00/07/14 07:20:09

  Modified:    src/lib/apr/threadproc/os2 proc.c
  Log:
  OS/2: Add implementation of ap_wait_all_procs().
  
  Revision  Changes    Path
  1.26      +28 -0     apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- proc.c	2000/06/20 19:36:42	1.25
  +++ proc.c	2000/07/14 14:20:08	1.26
  @@ -491,6 +491,34 @@
   
   
   
  +ap_status_t ap_wait_all_procs(ap_proc_t *proc, ap_wait_t *status,
  +                              ap_wait_how_e waithow, ap_pool_t *p)
  +{
  +    RESULTCODES codes;
  +    ULONG rc;
  +    PID pid;
  +
  +    if (!proc)
  +        return APR_ENOPROC;
  +
  +    rc = DosWaitChild(DCWA_PROCESSTREE, wait == APR_WAIT ? DCWW_WAIT : DCWW_NOWAIT, &codes, &pid, 0);
  +
  +    if (rc == 0) {
  +        proc->pid = pid;
  +
  +        if (status)
  +            *status = codes.codeResult;
  +
  +        return APR_CHILD_DONE;
  +    } else if (rc == ERROR_CHILD_NOT_COMPLETE) {
  +        return APR_CHILD_NOTDONE;
  +    }
  +
  +    return APR_OS2_STATUS(rc);
  +} 
  +
  +
  +
   ap_status_t ap_wait_proc(ap_proc_t *proc,
                              ap_wait_how_e wait)
   {