diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2019-07-20 06:36:25 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2019-07-20 06:36:25 +0200 |
commit | 0d78ec170900df342301a5bbe44e7ca883cc0db1 (patch) | |
tree | 065a85a1680f96b5d2540db507a6737791a934db /iurt | |
parent | dedd026543d23ed6f097535a6124aac440ca37d2 (diff) | |
download | iurt-0d78ec170900df342301a5bbe44e7ca883cc0db1.tar iurt-0d78ec170900df342301a5bbe44e7ca883cc0db1.tar.gz iurt-0d78ec170900df342301a5bbe44e7ca883cc0db1.tar.bz2 iurt-0d78ec170900df342301a5bbe44e7ca883cc0db1.tar.xz iurt-0d78ec170900df342301a5bbe44e7ca883cc0db1.zip |
fix timeout message when killing for other reason
Diffstat (limited to 'iurt')
-rwxr-xr-x | iurt | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -40,7 +40,7 @@ use URPM; use Iurt::Urpmi; use Iurt::Chroot qw(add_local_user create_temp_chroot remove_chroot create_build_chroot clean_chroot); -use Iurt::Process qw(perform_command kill_for_good sudo); +use Iurt::Process qw(perform_command kill_for_good set_alarm_message sudo); use Iurt::Mail qw(sendmail); use Iurt::Util qw(plog_init plog); use File::NCopy qw(copy); @@ -1082,9 +1082,11 @@ sub check_pid { my $state = `ps h -o state $pid`; chomp $state; if ($time < time()-36000 || $state eq 'Z') { - plog("an other iurt pid $pid is running for a very long time or is zombie, killing it"); + my $msg = "an other iurt pid $pid is running for a very long time or is zombie, killing it"; + plog($msg); my $i; while ($i < 5 && getpgrp $pid != -1) { + set_alarm_message($msg); kill_for_good($pid); $i++; sleep 1; |