1

closing descriptors of pipes in linux

view story
linux-howto

http://unix.stackexchange.com – Following is a general pipe() usage example: int fd[2]; pipe(fd); if((childpid = fork()) == -1) { perror("fork"); exit(1); } if(childpid == 0) { /* Child process closes up input side of pipe */ close(fd[0]); ////.....some code....//// exit(0); } else { /* Parent process closes up output side of pipe */ close(fd[1]); ////.....some code....//// } What I want to (HowTos)