From e8f916d10d7949274159ed822848d419804d2a73 Mon Sep 17 00:00:00 2001 From: wrowe Date: Mon, 1 Oct 2007 21:54:20 +0000 Subject: 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 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@581089 13f79535-47bb-0310-9956-ffa450edef68 --- threadproc/unix/proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'threadproc') 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) { -- cgit v1.2.1