Follow-up to r1906885.
* threadproc/win32/proc.c
(apr_proc_create): Close redirect pipes only on success to match pre-r1906885
behavior.
@@ -916,6 +916,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
stderr_reset, stderr_reset);
}
+ if (rv == APR_SUCCESS) {
/* Close our side of pipes before releasing lock: otherwise they
* could like to other process when apr_proc_create() is used from
* from multiple threads.
@@ -929,6 +930,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if ((attr->child_err) && (attr->child_err != &no_file)) {
apr_file_close(attr->child_err);
}
+ }
/* RELEASE CRITICAL SECTION
* The state of the inherited handles has been restored.
