diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-09 08:12:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-09 08:12:35 +0000 |
commit | fbad950f6e7ea78908c0f268ea065d467404e497 (patch) | |
tree | cfa7955b01d127e5b195f00d53365b3320fdd615 | |
parent | 717f536c12c97af9b35ee2ec927eed777b1325c7 (diff) | |
download | control-center-fbad950f6e7ea78908c0f268ea065d467404e497.tar control-center-fbad950f6e7ea78908c0f268ea065d467404e497.tar.gz control-center-fbad950f6e7ea78908c0f268ea065d467404e497.tar.bz2 control-center-fbad950f6e7ea78908c0f268ea065d467404e497.tar.xz control-center-fbad950f6e7ea78908c0f268ea065d467404e497.zip |
run a cleaner every 200ms to reap zombies
-rwxr-xr-x | control-center | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/control-center b/control-center index 2c30d12e..24baff6c 100755 --- a/control-center +++ b/control-center @@ -752,6 +752,7 @@ $SIG{CHLD} = \&sig_child; $window_splash->destroy; undef $window_splash; +Glib::Timeout->add(200, sub { print "CLEANING\n"; sig_child(1); 1 }); Gtk2->main; @@ -997,6 +998,7 @@ sub quit_global() { # got when child died and gone in zombie state sub sig_child() { + my ($o_is_cleaner) = @_; my $child_pid; do { $child_pid = waitpid(-1, POSIX::WNOHANG); @@ -1007,7 +1009,7 @@ sub sig_child() { undef $pid_exp if $pid_exp eq $child_pid; } while $child_pid > 0; # child unexpectedly died (cleanup since child_just_exited won't be called by plug-removed since plug never was added) - return unless $left_locked; + return if $o_is_cleaner || !$left_locked; child_just_exited(); splash_warning(N("This program has exited abnormally")); } |