apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r581089 - /apr/apr/trunk/threadproc/unix/proc.c
Date Mon, 01 Oct 2007 21:54:20 GMT
Author: wrowe
Date: Mon Oct  1 14:54:20 2007
New Revision: 581089

URL: http://svn.apache.org/viewvc?rev=581089&view=rev
Log:
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.com>

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=581089&r1=581088&r2=581089&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/proc.c (original)
+++ apr/apr/trunk/threadproc/unix/proc.c Mon Oct  1 14:54:20 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) {



Mime
View raw message