Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int p_to_c[2];
- int c_to_p[2];
- int pid = fork();
- if(pid == 0){
- close(p_to_c[1]);
- close(c_to_p[0]);
- dup2(p_to_c[0], 0);
- close(p_t_c[0]);
- dup2(c_to_p[1], 1);
- close(c_to_p[1]);
- execl(/* irrelevant*/)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement