Pipe in C UNIX shell

后端 未结 2 1469
抹茶落季
抹茶落季 2021-01-21 00:17

I am not very sure how to create a pipe between two child processes. This is the way I did it:

pipe(&fd[0]);                               //Create a pipe
pr         


        
2条回答
  •  礼貌的吻别
    2021-01-21 00:43

    The best answer I can give is Beej's Guide to Unix IPC.

    (Peek at section 4.3, where he gives a very similar example to the question you asked...)

提交回复
热议问题