summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-10-01 19:27:49 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-10-01 19:27:49 +0000
commit8defa6e6c1e336e85d62073effa24c771299e37c (patch)
treed7dce4d2c2186db33fea8e6ff186a37da92591ca /threadproc
parentee1a625610478f78062874edb61ed350b73aefe9 (diff)
downloadapr-8defa6e6c1e336e85d62073effa24c771299e37c.tar.gz
Had inverted the logic for closing the handles in the parent, thanks to glasser
for pointing this out to me on #irc. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@581042 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/unix/proc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 1dfa0fb15..ec065ebcc 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) {
@@ -574,15 +574,15 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
/* Parent process */
- if (attr->child_in && (attr->child_in->filedes == -1)) {
+ if (attr->child_in && (attr->child_in->filedes != -1)) {
apr_file_close(attr->child_in);
}
- if (attr->child_out && (attr->child_out->filedes == -1)) {
+ if (attr->child_out && (attr->child_out->filedes != -1)) {
apr_file_close(attr->child_out);
}
- if (attr->child_err && (attr->child_err->filedes == -1)) {
+ if (attr->child_err && (attr->child_err->filedes != -1)) {
apr_file_close(attr->child_err);
}