mkfifo causes terminal to hang?

后端 未结 2 786
离开以前
离开以前 2021-01-23 23:06

Does mkfifo simply not work with Cygwin? A simple set of commands such as

$ mkfifo my_pipe

$ echo \"1234\" > my_pipe

just caus

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-23 23:30

    No, you're not doing anything wrong with either of those commands, it's just your expectations are a little off.

    What you're missing is something at the other end of that pipe, reading that data. This apparent hanging happens in Linux as well, so it's not a CygWin problem (or any sort of problem, really).

    Just open up another window and enter:

    cat 

    and you'll see the data appear, followed by the original echo completing.

提交回复
热议问题