From: dms Date: Sat, 5 Jan 2002 12:55:46 +0000 (+0000) Subject: - we used $name instead of $_ in fe. Finally fixed fork. [I'm a moron] X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6aa2d51c3029648cbf110788a556dada6647d943;p=infobot.git - we used $name instead of $_ in fe. Finally fixed fork. [I'm a moron] git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@540 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Shm.pl b/blootbot/src/Shm.pl index 0c6c4f6..adad484 100644 --- a/blootbot/src/Shm.pl +++ b/blootbot/src/Shm.pl @@ -92,16 +92,17 @@ sub addForked { } foreach (keys %forked) { - my $time = time() - $forked{$_}{Time}; + my $n = $_; + my $time = time() - $forked{$n}{Time}; next unless ($time > $forker_timeout); ### TODO: use &time2string()? - &WARN("Fork: looks like we lost '$_', executed $time ago"); + &WARN("Fork: looks like we lost '$n', executed $time ago"); - my $pid = $forked{$name}{PID}; + my $pid = $forked{$n}{PID}; if (!defined $pid) { - &WARN("Fork: no pid for $name."); - delete $forked{$name}; + &WARN("Fork: no pid for $n."); + delete $forked{$n}; next; } @@ -116,7 +117,7 @@ sub addForked { kill 9, $pid; } - delete $forked{$name}; + delete $forked{$n}; } my $count = 0;