diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-17 13:48:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-17 13:48:40 +0000 |
commit | 74c9734e706efd5cb9f4db73a4bf76b3102847eb (patch) | |
tree | 732c7c4eb69cd1be669d7a908dd852568c9a5ab2 | |
parent | 0d01c7dcd0fad2bb0a9699ac6597868b26598a98 (diff) | |
download | control-center-74c9734e706efd5cb9f4db73a4bf76b3102847eb.tar control-center-74c9734e706efd5cb9f4db73a4bf76b3102847eb.tar.gz control-center-74c9734e706efd5cb9f4db73a4bf76b3102847eb.tar.bz2 control-center-74c9734e706efd5cb9f4db73a4bf76b3102847eb.tar.xz control-center-74c9734e706efd5cb9f4db73a4bf76b3102847eb.zip |
(sig_child) consolidate reaping zombies code into reap_zombies() and
reuse it after we killed embedded children (thus preventing non
embedded children to stay unreapon on system memory until mcc exits
and init reap them)
-rwxr-xr-x | control-center | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/control-center b/control-center index 8a4095b6..d099a8bc 100755 --- a/control-center +++ b/control-center @@ -679,19 +679,24 @@ sub update_exp() { } } +sub reap_zombies { + my $child_pid; + do { $child_pid = waitpid(-1, POSIX::WNOHANG) } until $child_pid > 0; +} #------------------------------------------------------------- # signals managment + + # got when child died and gone in zombie state sub sig_child() { - # reap zombies - my $kid; - do { $kid = waitpid(-1, POSIX::WNOHANG) } until $kid > 0; + reap_zombies(); # child unexpectedly died: return unless $left_locked; child_just_exited(); + reap_zombies(); splash_warning(N("This program has exited abnormally")); } |