Gooberlx2
Lifer
I'm writing a simple little perl gui for a specific rsync command.
I want to capture and print the output from that rsync to a status textarea.
The hitch is that the text area won't print the output until the command has finished, whereas a simple print command shows I am properly capturing and printing the information in real-time.
Any ideas?
edit:
Well, I just wrote something in Java instead. I'm not sure why it wouldn't update the textarea when the the print command worked just fine. Could have been a threading issue, but I'm not familiar with working with threads in perl.
I want to capture and print the output from that rsync to a status textarea.
The hitch is that the text area won't print the output until the command has finished, whereas a simple print command shows I am properly capturing and printing the information in real-time.
Any ideas?
my $pid = open(OUT, "$cmd |") || die "failed: $!\n";
my $out;
while(read(OUT, $out,1)==1 ){
print $out;
$textbuffer->insert($textbuffer->get_end_iter, $out);
}
edit:
Well, I just wrote something in Java instead. I'm not sure why it wouldn't update the textarea when the the print command worked just fine. Could have been a threading issue, but I'm not familiar with working with threads in perl.