C pipe, fork, dup, and exec()
问题 I'm trying to pass list of strings through pipe to child process where it should display through /bin/cat using execl() . I had it working earlier except that the pipe did not close so the program kept waiting. Don't know what I did and now it is not working at all. Can someone see my code and tell me what am I doing wrong that the str data is not being displayed by cat in child process? int main(int argc, char** argv) { char *str[] = {"The", "quick", "brown", "fox", "jumped", "over", "the",