Matlab read from named pipe (fifo)

大憨熊 提交于 2019-12-11 02:55:55

问题


I am having trouble reading from a named pipe/fifo in matlab under linux.

textread() on the pipe always returns "Empty matrix: 0-by-1". textread() blocks until data was written to the pipe.

If I use fopen() and fscanf(), then fopen will block until it receives some data. The first call to fscanf() will return the written data, and all subsequent calls of fscanf() return nothing (e.g. '') without blocking.

fread() behaves as fscanf()

fgets() returns -1

Anyone knows how to read from a pipe?

来源:https://stackoverflow.com/questions/19467986/matlab-read-from-named-pipe-fifo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!