diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-12 09:48:44 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-12 09:48:44 +0000 |
commit | c04384a7d773c1ae45252668954e938fe4f32c02 (patch) | |
tree | cfee108d1c6d5a02b265db7f2c5659e6e1ee5024 | |
parent | c4990e5ab38ab7400aeb5dc77f5dd86786595d3a (diff) | |
download | iurt-c04384a7d773c1ae45252668954e938fe4f32c02.tar iurt-c04384a7d773c1ae45252668954e938fe4f32c02.tar.gz iurt-c04384a7d773c1ae45252668954e938fe4f32c02.tar.bz2 iurt-c04384a7d773c1ae45252668954e938fe4f32c02.tar.xz iurt-c04384a7d773c1ae45252668954e938fe4f32c02.zip |
Display running time in PID warning
-rwxr-xr-x | iurt2 | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -72,7 +72,8 @@ my (@stat) = stat $pidfile; my $pid = <PID>; close PID; if ($pid && getpgrp $pid != -1) { - if ($stat[9] < time - 36000) { + my $time = $stat[9]; + if ($time < time - 36000) { print "An other iurt pid $pid is running for a very long time, killing it\n"; my $i; while ($i < 5 && getpgrp $pid != -1) { @@ -81,7 +82,7 @@ my (@stat) = stat $pidfile; sleep 1 } } else { - print "An other iurt is running for $my_arch, pid $pid\n"; + print "An other iurt is running for $my_arch, pid $pid, since $time seconds\n"; exit } } else { |