I create a fifo:
mkfifo tofetch
I run this python code:
fetchlistfile = file("tofetch", "r")
while 1:
nextfetch = fetchlistfile.readline()
print nextfetch
It stalls on readline, as I would hope. I run:
echo "test" > tofetch
And my program doesn't stall anymore. It reads the line, and then continues looping forever. Why won't it stall again when there's no new data?
I also tried looking on "not fetchlistfile.closed", I wouldn't mind reopening it after every write, but Python thinks the fifo is still open.