fork: no need to _exit() on the error case

This commit is contained in:
Hiltjo Posthuma
2015-03-10 20:05:18 +01:00
parent 82bebf8ce7
commit 066a0306a1
4 changed files with 4 additions and 8 deletions

3
tar.c
View File

@@ -54,8 +54,7 @@ decomp(FILE *fp)
switch (fork()) {
case -1:
weprintf("fork:");
_exit(1);
eprintf("fork:");
case 0:
dup2(fileno(fp), 0);
dup2(fds[1], 1);