Browse Source

amended check_redirect

master
10195501441 3 years ago
parent
commit
82a29c1b7d
3 changed files with 4 additions and 1 deletions
  1. +0
    -0
      result.txt
  2. BIN
      yeeshell
  3. +4
    -1
      yeeshell.c

+ 0
- 0
result.txt View File


BIN
yeeshell View File


+ 4
- 1
yeeshell.c View File

@ -227,6 +227,10 @@ int execute(char *cmdline, char **args)
free(redirect_args);
exit(0);
}
if ((redirect_flag == 1) || (redirect_flag == 2))
{
close(fd);
}
}
else
{
@ -251,7 +255,6 @@ int execute(char *cmdline, char **args)
}
}
}
close(fd);
return 1;
}

Loading…
Cancel
Save