Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • The script/program doesn't even start to execute until there is data in the pipe. Also, unrelated to your issue: Prompting should always be done on the standard error stream, not and standard output. Commented Jun 14, 2018 at 14:15
  • That's (shocking) news to me! Why should the program not even start? If the input were coming in from a regular disk file (and, not from a fifo), would the same semantics of program execution hold? Input should get read ONLY when it's needed, not before. So, a reading from fifo should block only on reaching the point of input in the program, no? Commented Jun 14, 2018 at 14:23