BASH named pipe locking up
I don't understand why this is happening. I've been working with this same command for a long time and now, suddenly, it's started locking up.
mkfifo ./pipe
echo "test" >./pipe
What can I do to stop this from locking u开发者_JAVA百科p?
Read from the FIFO.
It's not locked up. It's waiting for something to read from the pipe. Execute
cat < ./pipe
in another window, and it will print out the test
string you put into the pipe, and then your echo
will exit.
I was having the same problem, and the same... huh... thinking error...
I solved my problem here, and discovered An excellent article about named pipes I wanted to share with everybody wanting to use "rightly" named pies.
Don't forget to read the comments ;)
Enjoy !
精彩评论