correction code
This commit is contained in:
@@ -42,4 +42,5 @@ printf("%d\n", r1);
|
||||
|
||||
int r2 = execute_me("wrong", argv);
|
||||
printf("%d\n", r2);
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ void piped(){
|
||||
char buffer[2048];
|
||||
read(fd[0], buffer, sizeof(buffer));
|
||||
|
||||
printf("My child sends me : %s\n", buffer);
|
||||
printf("My child sends me : %s", buffer);
|
||||
close(fd[0]);
|
||||
wait(NULL);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ int fibo (int n){
|
||||
}
|
||||
int wait_child(int x){
|
||||
|
||||
if(x < 0) return -1;
|
||||
if(x < 0) return 1;
|
||||
|
||||
int wstatus;
|
||||
pid_t pid = fork();
|
||||
|
||||
Reference in New Issue
Block a user