From 162884bd41d51530fee5376fa661fcb1ba245c01 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 7 Aug 2019 14:35:23 +0200 Subject: Revert "fix timeout message when killing for other reason" This reverts commit 0d78ec170900df342301a5bbe44e7ca883cc0db1. Rationale: That will not work as intended b/c the message is set in the child process while it gets logged in the parent --- iurt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'iurt') diff --git a/iurt b/iurt index 9008bdf..95aa89c 100755 --- a/iurt +++ b/iurt @@ -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 set_alarm_message sudo); +use Iurt::Process qw(perform_command kill_for_good sudo); use Iurt::Mail qw(sendmail); use Iurt::Util qw(plog_init plog); use File::NCopy qw(copy); @@ -1082,11 +1082,9 @@ sub check_pid { my $state = `ps h -o state $pid`; chomp $state; if ($time < time()-36000 || $state eq 'Z') { - my $msg = "an other iurt pid $pid is running for a very long time or is zombie, killing it"; - plog($msg); + plog("an other iurt pid $pid is running for a very long time or is zombie, killing it"); my $i; while ($i < 5 && getpgrp $pid != -1) { - set_alarm_message($msg); kill_for_good($pid); $i++; sleep 1; -- cgit v1.2.1