How to block on last write until other program read the fifo ?
import os
fn='/tmp/fifo'
try:
os.mkfifo(fn)
except FileExistsError as e:
print(fn,e)
f=os.open(fn, os.O_SYNC | os.O_CREAT | os.O_RDWR)
os.write(f, r) # how to block on there
print('write end!')