aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2005-12-12 09:48:44 +0000
committerFlorent Villard <warly@mandriva.com>2005-12-12 09:48:44 +0000
commitc04384a7d773c1ae45252668954e938fe4f32c02 (patch)
treecfee108d1c6d5a02b265db7f2c5659e6e1ee5024
parentc4990e5ab38ab7400aeb5dc77f5dd86786595d3a (diff)
downloadiurt-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-xiurt25
1 files changed, 3 insertions, 2 deletions
diff --git a/iurt2 b/iurt2
index 231ca4e..a0e9582 100755
--- a/iurt2
+++ b/iurt2
@@ -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 {