Non-blocking reads of a fifo (named pipe)?

Basile B. b2.temp at gmx.com
Tue Dec 4 06:08:32 UTC 2018


On Monday, 3 December 2018 at 23:32:10 UTC, Anonymouse wrote:
> I have a fifo that I want to read lines from, but everything is 
> blocking.
> [...]
> How can I go about doing this to get non-blocking reads? Or 
> perhaps a way to test whether there is text waiting in the 
> fifo? File.eof is not it.
> [...]

I did this i think for my AsyncProcess class. It was a while ago 
and i never used it but IIRC it seemed to work on linux (not on 
Windows still IIRC)

https://github.com/BBasile/iz/blob/master/import/iz/classes.d#L1584


More information about the Digitalmars-d-learn mailing list