I have 2 python programs. One is the reader
fifo_read=open('buffer','r')
while True:
data=fifo_read.read(1)
print('"',data,'"read from buffer')
and the other is the writer
import time
fifo_write=open('./buffer','w')
while True:
fifo_write.write('a')
fifo_write.flush()
time.sleep(1)
The problem that I am facing is, as soon as I terminate the writer with Ctrl+C, the reader continues reading "" from the FIFO. For my purposes, I want the reader to block until another writer starts sometime in the future and starts writing to the FIFO. But this is not happening in this case.