diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-26 18:21:04 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-26 18:21:04 +0000 |
commit | f686cda7cf94583b8d4b49ee0dcafaf1d32a218b (patch) | |
tree | caf9b5ed001012a173543bfb840541e81f5d71cd | |
parent | 7329f48adaaa1f54a4b264e97eae7853265922ee (diff) | |
download | iurt-f686cda7cf94583b8d4b49ee0dcafaf1d32a218b.tar iurt-f686cda7cf94583b8d4b49ee0dcafaf1d32a218b.tar.gz iurt-f686cda7cf94583b8d4b49ee0dcafaf1d32a218b.tar.bz2 iurt-f686cda7cf94583b8d4b49ee0dcafaf1d32a218b.tar.xz iurt-f686cda7cf94583b8d4b49ee0dcafaf1d32a218b.zip |
(fork_to_monitor) always say why iurt got killed due to space issues
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/Iurt/Process.pm | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,5 @@ 0.6.7 (unreleased) +- always show why iurt got killed when free space or log size is an issue - better error messages when running as root or w/o sudo - kill unused/untested features - make it load the needed File::lockf module diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 310647f..38939a5 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -102,14 +102,14 @@ sub fork_to_monitor { my (@stat) = stat $logfile; if ($stat[7] > $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})"); + plog('NONE', "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) { # 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)"); + plog('NONE', "ERROR: killing current command because running out of disk space at $opt{log} (only $df->{bavail}KB left)"); kill 14, "-$parent_pid"; exit(); } |