diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-25 23:28:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-25 23:28:45 +0000 |
commit | 1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6 (patch) | |
tree | 5919bc46ac81361aaac9866e3486e0bce9d3f9ed | |
parent | 27109ffcd5b98f74f8d1bf099d9ba76db3ac86cd (diff) | |
download | iurt-1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6.tar iurt-1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6.tar.gz iurt-1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6.tar.bz2 iurt-1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6.tar.xz iurt-1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6.zip |
(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)
-rw-r--r-- | lib/Iurt/Process.pm | 6 |
1 files 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(); } |