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

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

$
0
0

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. Also your declaration of main function is old c type declaration make it like void main().

<sys/types.h>
<sys/wait.h>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>