I've created a named pipe on Debian using mkfifo pipe.in
. I want to write to this pipe from Matlab.
To do this, I use the following matlab command:
unix( 'cat <myfile> > pipe.in' )
Where <myfile>
is a text file and pipe.in
is the pipe I created with mkfifo
.
In many cases, the process associated to the pipe crashed for many reason (but any reason beyond the use of the unix and cat command). The crash can be normal in several cases.
Executing the above command causes Matlab to freeze, and I can't regain control with CTRL+C
.
Is there another way to release Matlab without requiring me to kill the process?
cat
command in the background by appending&
to the command...mkfifo pipe.i; mkfifo pipe.out; time echo "<intern command of the executable>"| <executable> > log &
cat
the file without the pipe, does this freeze? Have you tried opening the pipe from within matlab usingfopen
and writing to it usingfprintf
?