From: Tim Hammerquist Date: 2002-07-12T19:52:21+09:00 Subject: Re: new to ruby,how to make FIFO in ruby? Maggie Xiao graced us by uttering: > Is there anyone can tell me how to make FIFO in ruby? I cannot find > the related method? Thanks. When I ported a Perl script that used (Unix special filetype) FIFOs, I simply used Kernal::system to call the external executable. Another option might be to use the mkfifo(3) POSIX call on systems that support it. If anyone knows of a more graceful way to accomplish this, I'd be very interested in hearing it. Just as a (somewhat anal) optimization/efficiency issue, backticks would be overkill, as mknod(1)/mkfifo(1) don't write anything to stdout. It's sufficient to run under Kernel::system and check the return value, rather than run it in backticks and capture output that may not exists into a variable that may not even be present. A similar, Perl-related issue can be found here (if you have the perldoc command): $ perldoc -q map or here: http://www.perldoc.com/perl5.6.1/pod/perlfaq6.html --> "What's wrong with using grep or map in a void context?" > Maggie HTH Tim Hammerquist -- Westley: Why didn't you wait for me? Buttercup: Well, you were dead. -- "The Princess Bride"