Quantcast
Channel: C Linux programming - Pipe makes child process exit - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Abhijit Pritam Dutta for C Linux programming - Pipe makes child...

Your problem is not with pipe. Two header files missing in your codes and for which it is crashing when calling wait() function. Add below two header files in your program and it will fix your problem....

View Article



Answer by Some programmer dude for C Linux programming - Pipe makes child...

That's standard behavior. You close the read-end of the pipe, so there is nowhere to write. That results in a SIGPIPE signal being sent to the writing process. The default behavior of SIGPIPE is to...

View Article

C Linux programming - Pipe makes child process exit

I am having a hard time understanding the behavior of the following code. Closing the file descriptor p[0] makes the program exit (since otherwise the parent process just waits on the child processes...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images