You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/01 21:27:50 UTC
svn commit: r581042 - /apr/apr/trunk/threadproc/unix/proc.c
Author: wrowe
Date: Mon Oct 1 12:27:49 2007
New Revision: 581042
URL: http://svn.apache.org/viewvc?rev=581042&view=rev
Log:
Had inverted the logic for closing the handles in the parent, thanks to glasser
for pointing this out to me on #irc.
Modified:
apr/apr/trunk/threadproc/unix/proc.c
Modified: apr/apr/trunk/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/unix/proc.c?rev=581042&r1=581041&r2=581042&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/proc.c (original)
+++ apr/apr/trunk/threadproc/unix/proc.c Mon Oct 1 12:27:49 2007
@@ -416,7 +416,7 @@
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_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_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 @@
}
/* 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);
}