March 20, 2012

fifo doesn't work


When I try to pass some data trough an fifo, I can't get what I expect. First I creat an fifo named "fifo1" by using "mkfifo", and then I type the following commands:
echo "some data" >fifo1

It works sometimes since I can see the output("some data") from cat, but sometimes I cannot see any output. I'm now using Ubuntu 11.10 with Linux version 3.0.0-16-generic.

What could be the cause? My guess is the buffering. Any solution to this? Thanks!

Click Here!