问题描述
如何在上次写入时阻塞直到其他程序读取 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!')
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)