From c04384a7d773c1ae45252668954e938fe4f32c02 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Mon, 12 Dec 2005 09:48:44 +0000 Subject: Display running time in PID warning --- iurt2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'iurt2') diff --git a/iurt2 b/iurt2 index 231ca4e..a0e9582 100755 --- a/iurt2 +++ b/iurt2 @@ -72,7 +72,8 @@ my (@stat) = stat $pidfile; my $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 { -- cgit v1.2.1