summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-03-19 13:03:21 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-03-19 13:03:21 +0000
commitb1f365c5c344d99b28f2210b636331ef4c20bae2 (patch)
treef1807de48d75ff3d1501d28b8cb706261980f75f /perl-install/standalone
parent9d83d90b443210de204fb65acecf49c52dbaaecb (diff)
downloaddrakx-b1f365c5c344d99b28f2210b636331ef4c20bae2.tar
drakx-b1f365c5c344d99b28f2210b636331ef4c20bae2.tar.gz
drakx-b1f365c5c344d99b28f2210b636331ef4c20bae2.tar.bz2
drakx-b1f365c5c344d99b28f2210b636331ef4c20bae2.tar.xz
drakx-b1f365c5c344d99b28f2210b636331ef4c20bae2.zip
properly *both* reap zombies and clear status bar message
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/harddrake211
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index cb9a48e41..54f683e64 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -9,6 +9,7 @@ use common;
use ugtk2 qw(:create :helpers :wrappers);
use interactive;
use harddrake::data; #- needs to stay after use-ugtk2 as long as this module defines globals containing some N()
+use POSIX qw(:sys_wait_h);
# { field => [ short_translation, full_description] }
@@ -298,7 +299,14 @@ foreach (@harddrake::data::tree) {
$parent_iter->free;
}
-$SIG{CHLD} = sub { undef $pid; $statusbar->pop($sig_id) };
+$SIG{CHLD} = sub {
+ undef $pid;
+ $statusbar->pop($sig_id);
+ # reap zombies
+ my $child_pid;
+ do { $child_pid = waitpid(-1, POSIX::WNOHANG) } until $child_pid > 0;
+};
+
$w->{rwindow}->signal_connect(delete_event => \&quit_global);
$w->{rwindow}->set_position('center') unless $::isEmbedded;
@@ -321,7 +329,6 @@ $w->{rwindow}->show_all;
undef $wait;
gtkset_mousecursor_normal();
$_->hide foreach $module_cfg_button, $config_button; # hide buttons while no device
-$SIG{CHLD} = 'IGNORE';
$w->main;