Ticket #2185: execunix.c.patch

File execunix.c.patch, 828 bytes (added by anonymous, 13 years ago)

updated

  • execunix.c

     
    191191        if ( pipe( out ) < 0 )
    192192            exit( EXITBAD );
    193193        fcntl( out[0], F_SETFL, O_NONBLOCK );
    194         fcntl( out[1], F_SETFL, O_NONBLOCK );
    195194
    196195        if ( pipe( err ) < 0 )
    197196            exit( EXITBAD );
    198197        fcntl( err[0], F_SETFL, O_NONBLOCK );
    199         fcntl( err[1], F_SETFL, O_NONBLOCK );
    200198    }
    201199
    202200    /* Start the command */
     
    232230        }
    233231        else
    234232            dup2( err[1], STDERR_FILENO );
     233        close( out[1] );
     234        close( err[1] );
    235235
    236236        /* Make this process a process group leader so that when we kill it, all
    237237         * child processes of this process are terminated as well. We use