I have a program that displays a prompt message and waits for the user to input some text.
$ program Input a line of text: <aaaa> Some more output. $
Now, I also want to be able to provide this input, programmatically, via a FIFO, like so:
$ program < fifo
But what's happening is, the prompt on stdout does not appear until I have supplied the input to
I next tried a very simple equivalent of my program, like so:
$ echo aaaa < fifo
aaaa doesn't appear until
fifo has been supplied its input.
Question: How do I make my output till the point I wait for input from
stdin appear on
stdout when using FIFO?