From e87d25b03542939cc97314e65bfed6aa611a47ae Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 19 Jul 2005 05:50:28 +0000 Subject: really reap zombie children; side-effect: we can now run a second config tool again (#16851) --- perl-install/standalone/harddrake2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index c762777f7..4a448ee08 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -441,12 +441,13 @@ foreach (@classes) { $tree->expand_row($tree_model->get_path($parent_iter), 1) unless $title eq N("Unknown/Others"); } -$SIG{CHLD} = sub { +sub reap_children() { undef $pid; # reap zombies my $child_pid; do { $child_pid = waitpid(-1, POSIX::WNOHANG) } until $child_pid > 0; }; +$SIG{CHLD} = \&reap_children; $w->{rwindow}->signal_connect(delete_event => \&quit_global); $w->{rwindow}->set_position('center') unless $::isEmbedded; @@ -480,6 +481,7 @@ $_->hide foreach $module_cfg_button, $config_button; # hide buttons while no dev } } } +$SIG{CHLD} = \&reap_children; undef $wait; gtkset_mousecursor_normal(); -- cgit v1.2.1