diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-01 21:54:20 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-01 21:54:20 +0000 |
commit | e8f916d10d7949274159ed822848d419804d2a73 (patch) | |
tree | fd2106b05719920b8552696facbfce9295914e0c /threadproc | |
parent | 46e4e18e673e841027ab7e0ac107050f435d1805 (diff) | |
download | libapr-e8f916d10d7949274159ed822848d419804d2a73.tar.gz |
Close the standard handle in the child, *when* we tagged it with fd -1
(we aren't trying to close our child_fd's here).
Submitted by: David Glasser <glasser@davidglasser.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@581089 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/unix/proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c index ec065ebcc..21b44d4b8 100644 --- a/threadproc/unix/proc.c +++ b/threadproc/unix/proc.c @@ -416,7 +416,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, apr_pool_cleanup_for_exec(); - if ((attr->child_in) && (attr->child_in->filedes != -1)) { + if ((attr->child_in) && (attr->child_in->filedes == -1)) { close(STDIN_FILENO); } else if (attr->child_in) { @@ -425,7 +425,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, apr_file_close(attr->child_in); } - if ((attr->child_out) && (attr->child_out->filedes != -1)) { + if ((attr->child_out) && (attr->child_out->filedes == -1)) { close(STDOUT_FILENO); } else if (attr->child_out) { @@ -434,7 +434,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, apr_file_close(attr->child_out); } - if ((attr->child_err) && (attr->child_err->filedes != -1)) { + if ((attr->child_err) && (attr->child_err->filedes == -1)) { close(STDERR_FILENO); } else if (attr->child_err) { |