execute([ "mkfifo", filename ]);
File fifo = File(filename, "r"); // blocks already
immutable input = fifo.readln(); // blocks
foreach (line; fifo.byLineCopy) { /* blocks */ }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.
if (fifo.hasData)
{
immutable stuff = fifo.readln();
// ...
}
