Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"waiting for data" msg should appear immediately on F command on a fifo.
On a file, poll() returns POLLIN (readable data) even if we are at end of file. This allows the code in ch_get to see that there is no data available and display the "waiting for data" message. But on a fifo, if there is no data available, poll() will block until the timeout, so at eof on a pipe we will be stuck in the poll and never display the waiting message. This commit changes the timeout so that on the first read on a fifo (when there is no waiting message displayed) we will use timeout=0 and return immediately. This allows ch_get to display the waiting message. After the message is displayed, subsequent reads will use an infinite timeout. Related to #555.
- Loading branch information