double_pipe.c
This commit is contained in:
@@ -20,11 +20,12 @@ int duper(char **argv, char *output){
|
||||
|
||||
//int fd[2];
|
||||
//pipe(fd);
|
||||
|
||||
if(!argv || !*argv || !output) return 1;
|
||||
|
||||
int wstatus;
|
||||
pid_t pid = fork();
|
||||
|
||||
if(pid < 0) return -1;
|
||||
if(pid < 0) return 1;
|
||||
|
||||
//Child
|
||||
else if (pid == 0){
|
||||
|
||||
Reference in New Issue
Block a user