From ae5c856cfc9d4184405911224b7a2fe91ee953ea Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 11 Oct 2002 16:56:21 +0000 Subject: Set program name according to current action. --- Echolot/Scheduler.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Echolot') diff --git a/Echolot/Scheduler.pm b/Echolot/Scheduler.pm index 1331aff..7b71e80 100644 --- a/Echolot/Scheduler.pm +++ b/Echolot/Scheduler.pm @@ -1,7 +1,7 @@ package Echolot::Scheduler; # (c) 2002 Peter Palfrader -# $Id: Scheduler.pm,v 1.12 2002/08/23 07:54:53 weasel Exp $ +# $Id: Scheduler.pm,v 1.13 2002/10/11 16:56:21 weasel Exp $ # =pod @@ -21,6 +21,7 @@ the ping daemon. use strict; use Carp qw{cluck confess}; +use English; my $ORDER = 1; @@ -132,6 +133,7 @@ sub run($) { warn("Task $task->{'name'} could not be started on time\n"); } else { print "zZzZZzz at $now\n" if Echolot::Config::get()->{'verbose'}; + $PROGRAM_NAME = "pingd [sleeping]"; sleep ($task->{'start'} - $now); }; @@ -142,6 +144,7 @@ sub run($) { do { $task = shift @{ $self->{'schedule'} }; my $name = $task->{'name'}; + $PROGRAM_NAME = "pingd [executing $name]"; (defined $self->{'tasks'}->{$name}) or warn("Task $task->{'name'} is not defined\n"); -- cgit v1.2.3