Open a pipe will block if other side hasn't opened this pipe

man fifo to see detail informations.

In linux, if an application opened a pipe while another side hasn't opened this pipe, the open will block.

You can use `mknod' with S_FIFO attribute to create a FIFO(named pipe), then use open/read/write just as usual.
原文地址:https://www.cnblogs.com/super119/p/1996120.html