help pls
This commit is contained in:
parent
49fb1af798
commit
7e91f16f1c
2 changed files with 2 additions and 4 deletions
|
|
@ -115,10 +115,10 @@ int main() {
|
|||
dup2(pipe_to_child[0], STDIN_FILENO);
|
||||
|
||||
execlp("./bin/djumbai_client_receive", "djumbai_client_receive", NULL);
|
||||
close(pipe_to_child[0]);
|
||||
|
||||
// If execlp fails
|
||||
perror("execlp");
|
||||
close(pipe_to_child[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
} else { // Parent process
|
||||
close(pipe_to_child[0]); // Close read end of pipe
|
||||
|
|
@ -127,8 +127,6 @@ int main() {
|
|||
|
||||
// Close the write end of the pipe
|
||||
close(pipe_to_child[1]);
|
||||
// Wait for the child process to finish
|
||||
wait(NULL);
|
||||
}
|
||||
}
|
||||
close(send_fifo_fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue