aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-25 23:28:45 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-25 23:28:45 +0000
commit1a3d62f5f652f8b2eabc905c6ed81f0d0ca65ac6 (patch)
tree5919bc46ac81361aaac9866e3486e0bce9d3f9ed /lib
parent27109ffcd5b98f74f8d1bf099d9ba76db3ac86cd (diff)
downloadiurt-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)
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Process.pm6
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();
}