From: Massimiliano Mirra Date: 2002-01-27T05:49:20+09:00 Subject: listening on a fifo I'm using the following to have a program listen on a fifo and take action whenever input becomes available. The fifo should be used like a device under /dev, like: $ echo 'hello world' >fifo Is there any better/nicer way? fifo = 'foo' `mkfifo #{fifo}` if not File.exists?(fifo) loop do f = File.open(fifo, File::RDONLY | File::NONBLOCK) select [f] p f.read end Massimiliano