diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 13:02:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 13:02:57 +0000 |
commit | b034de80a226a7421e58e5ea38d0785f899ed179 (patch) | |
tree | edf0e41824392bfd6faf49164c16d059b793469d /perl-install/ugtk2.pm | |
parent | cf19016631d8c48fb35b74e6941a166fc4be6adf (diff) | |
download | drakx-b034de80a226a7421e58e5ea38d0785f899ed179.tar drakx-b034de80a226a7421e58e5ea38d0785f899ed179.tar.gz drakx-b034de80a226a7421e58e5ea38d0785f899ed179.tar.bz2 drakx-b034de80a226a7421e58e5ea38d0785f899ed179.tar.xz drakx-b034de80a226a7421e58e5ea38d0785f899ed179.zip |
(gtk_TextView_get_log): handle errors
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 1d84b6c50..fcc8d66e4 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1434,7 +1434,7 @@ sub gtk_set_treelist { sub gtk_TextView_get_log { my ($log_w, $log_scroll, $command, $filter_output, $when_command_is_over) = @_; - my $pid = open(my $F, "$command |") or return sub { 1 }; + my $pid = open(my $F, "$command |") or return; fcntl($F, c::F_SETFL(), c::O_NONBLOCK()) or die "can't fcntl F_SETFL: $!"; my $gtk_buffer = $log_w->get_buffer; @@ -1473,7 +1473,7 @@ sub gtk_new_TextView_get_log { my $log_w = gtkset_editable(Gtk2::TextView->new, 0); my $log_scroll = create_scrolled_window($log_w); #- $log_scroll is a frame, not a ScrolledWindow, so giving $log_scroll->child - my $pid = gtk_TextView_get_log($log_w, $log_scroll->child, $command, $filter_output, $when_command_is_over); + my $pid = gtk_TextView_get_log($log_w, $log_scroll->child, $command, $filter_output, $when_command_is_over) or return; $log_scroll, $pid; } |