Replace the previous checkin with the correct fix.
authorRob Landley <rob@landley.net>
Wed, 19 Jul 2006 21:43:53 +0000 (21:43 -0000)
committerRob Landley <rob@landley.net>
Wed, 19 Jul 2006 21:43:53 +0000 (21:43 -0000)
shell/hush.c

index fedb784e474eb6df3198f535d9ef57daaf040442..8c432942e0e81733816e9ec6993ba5f753332f09 100644 (file)
@@ -1284,7 +1284,7 @@ static int run_pipe_real(struct pipe *pi)
        int i;
        int nextin, nextout;
        int pipefds[2];                         /* pipefds[0] is for reading */
-       struct child_prog *child = NULL;
+       struct child_prog *child;
        const struct built_in_command *x;
        char *p;
 
@@ -1295,7 +1295,7 @@ static int run_pipe_real(struct pipe *pi)
         * Builtins within pipes have to fork anyway, and are handled in
         * pseudo_exec.  "echo foo | read bar" doesn't work on bash, either.
         */
-       if (pi->num_progs == 1) child = & (pi->progs[0]);
+       child = & (pi->progs[0]);
        if (pi->num_progs == 1 && child->group && child->subshell == 0) {
                int squirrel[] = {-1, -1, -1};
                int rcode;