Polling pipes does not seem to work correctly on Fedora 1. Two perl scripts follow that demonstrate the problem. The below scripts work on all distros that I have tested, including RH9, but fails on Fedora 1. I have not tried the test Fedora 2. Ray #!/usr/local/bin/perl -w # This script is called "test.pl" and is run in the pipe. use strict; $| = 1; print "out1\n"; sleep 3; print "out2\n"; sleep 3; print "out3\n"; sleep 3; print "out4\n"; exit; Following is a script that invokes the above script. #!/usr/local/bin/perl -w # This script polls a command pipe by checking the filesize # of the pipe's file handle. use Tk; use strict; my $MW = MainWindow->new; my $txt = $MW->Text->pack; open (MY_PIPE, "test.pl |") or die "Couldn't open: $!\n"; my $pipe = \*MY_PIPE; $MW->repeat(50 => \&read_pipe); MainLoop; sub read_pipe { # Read from the pipe if data is present there. my $size = -s $pipe; if ($size) { my $line; sysread($pipe,$line,$size); return unless $line; $txt->insert('end', "$line"); $MW->update; } }
I have now tested the pipe polling problem on Fedora 2, test 3. The problem still exists. Ray
What about FC4?