EvanCarroll has asked for the wisdom of the Perl Monks concerning the following question:
Is there a reason why IPC::Open2 doesn't work with fifos, or am I doing something wrong.
These two examples must be run in different ttys, or you must background the echo to foobar, because it will wait for the output to be read before echo detaches.mkfifo foobar; echo "this is a test of the emergency fifo system" > foobar;
use IPC::Open2; open(my $fifo, "<", "foobar") or die $!; my $o; open(my $fh, ">", \$o) or die $!; open2($fh, $fifo, "/bin/echo") or die $!; print $o;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: My fifo wtf.
by ikegami (Patriarch) on Dec 18, 2008 at 03:12 UTC | |
by Mr. Muskrat (Canon) on Dec 18, 2008 at 16:58 UTC | |
|
Re: My fifo wtf.
by ikegami (Patriarch) on Dec 18, 2008 at 03:16 UTC | |
by EvanCarroll (Chaplain) on Dec 18, 2008 at 18:45 UTC | |
by ikegami (Patriarch) on Dec 18, 2008 at 19:15 UTC |