diff options
author | Brian Havard <bjh@apache.org> | 2000-07-14 14:20:08 +0000 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2000-07-14 14:20:08 +0000 |
commit | 3436486df971e554080b963765350043dfd60e71 (patch) | |
tree | 15061c147e1c36c0007ee74e011c6c0bc16f892f /threadproc/os2/proc.c | |
parent | cab8ca49ff5f9bd0cdb6595aa970ccd4aef0757a (diff) | |
download | apr-3436486df971e554080b963765350043dfd60e71.tar.gz |
OS/2: Add implementation of ap_wait_all_procs().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60370 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2/proc.c')
-rw-r--r-- | threadproc/os2/proc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c index 03f82ccd7..e2f004d5b 100644 --- a/threadproc/os2/proc.c +++ b/threadproc/os2/proc.c @@ -491,6 +491,34 @@ ap_status_t ap_create_process(ap_proc_t *proc, const char *progname, +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) { |