From 1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 25 Mar 2012 23:28:45 +0000 Subject: (perform_command) raise killing messages from WARN to ERROR (should maybe be 'NONE' as by default we will just see "Alarm clock" without any explanation ; worse sub processses (eg: urpmi) still run in the background; add FIXME notes about it) --- lib/Iurt/Process.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 29d3262..60bcdf1 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -155,13 +155,15 @@ sub perform_command { while ($tot_time < $opt{timeout}) { my (@stat) = stat $logfile; if ($stat[7] > $size_limit) { - plog('WARN', "WARNING: killing current command because of log size exceeding limit ($stat[7] > $config->{log_size_limit})"); + # FIXME: we left runaway processes (eg: urpmi) + plog('ERROR', "ERROR: killing current command because of log size exceeding limit ($stat[7] > $config->{log_size_limit})"); kill 14, "-$parent_pid"; exit(); } my $df = df $opt{log}; if ($df->{per} >= 99) { - plog('WARN', "WARNING: killing current command because running out of disk space at $opt{log} (only $df->{bavail}KB left)"); + # FIXME: we left runaway processes (eg: urpmi) + plog('ERROR', "ERROR: killing current command because running out of disk space at $opt{log} (only $df->{bavail}KB left)"); kill 14, "-$parent_pid"; exit(); } -- cgit v1.2.1