nothing
This commit is contained in:
parent
3e6baa5f7e
commit
5bb0428c15
7
bish.cc
7
bish.cc
|
@ -77,13 +77,14 @@ int main(int argc, char **argv){
|
|||
}
|
||||
}
|
||||
|
||||
// int i;
|
||||
// int n;
|
||||
// bish_expandexec(&cmd->cmds[0]);
|
||||
int in = 0, fd[2];
|
||||
for (int i = 0; i < num_cmds-1; i++) {
|
||||
pipe(fd);
|
||||
dup_io(in, fd[1], true);
|
||||
dup_io(in, fd[1]);
|
||||
bish_expandexec(&cmd->cmds[i]);
|
||||
close(fd[1]);
|
||||
// close(fd[1]);
|
||||
in = fd[0];
|
||||
}
|
||||
if (in != 0) {
|
||||
|
|
|
@ -133,7 +133,7 @@ int expand_and_execute (const char *program, char **options) {
|
|||
}
|
||||
}
|
||||
|
||||
pid = fork ();
|
||||
pid = fork();
|
||||
if (pid == 0) {
|
||||
/* This is the child process. Execute the command. */
|
||||
execvp (result.we_wordv[0], result.we_wordv);
|
||||
|
|
Loading…
Reference in New Issue