• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

print rsync output real-time to GUI in perl::gtk2

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?

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.
 
Back
Top