Index: execunix.c =================================================================== --- execunix.c (revision 58736) +++ execunix.c (working copy) @@ -226,13 +226,14 @@ dup2( out[1], STDOUT_FILENO ); if ( globs.pipe_action == 0 ) - { dup2( out[1], STDERR_FILENO ); - close( err[1] ); - } else dup2( err[1], STDERR_FILENO ); + /* No longer needed following dup2 */ + close( out[1] ); + close( err[1] ); + /* Make this process a process group leader so that when we kill it, all * child processes of this process are terminated as well. We use * killpg(pid, SIGKILL) to kill the process group leader and all its