summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-04 13:02:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-04 13:02:57 +0000
commitb034de80a226a7421e58e5ea38d0785f899ed179 (patch)
treeedf0e41824392bfd6faf49164c16d059b793469d
parentcf19016631d8c48fb35b74e6941a166fc4be6adf (diff)
downloaddrakx-backup-do-not-use-b034de80a226a7421e58e5ea38d0785f899ed179.tar
drakx-backup-do-not-use-b034de80a226a7421e58e5ea38d0785f899ed179.tar.gz
drakx-backup-do-not-use-b034de80a226a7421e58e5ea38d0785f899ed179.tar.bz2
drakx-backup-do-not-use-b034de80a226a7421e58e5ea38d0785f899ed179.tar.xz
drakx-backup-do-not-use-b034de80a226a7421e58e5ea38d0785f899ed179.zip
(gtk_TextView_get_log): handle errors
-rw-r--r--perl-install/ugtk2.pm4
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;
}