[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Fri Dec 31 09:31:38 2004 -->
- <!--x-from-r13: psbjyre ng bhgcbfgfragvary.pbz (Quevfgbcure Tbjyre) -->
- <!--x-message-id: [email protected] -->
- <!--x-subject: [ale] attaching an array to a hash -->
- <li><em>date</em>: Fri Dec 31 09:31:38 2004</li>
- <li><em>from</em>: cfowler at outpostsentinel.com (Christopher Fowler)</li>
- <li><em>subject</em>: [ale] attaching an array to a hash</li>
Here is sample:
$pids{$pid}{'name'} = $name;
$pids{$pid}{'pid'} = $pid;
$pids{$pid}{'cmd'} = $cmd;
$pids{$pid}{'args'} = @args;
This is part of an init.d program that stays running to make sure that
some programs never terminate. If they do it will be responsible for
logging an error and then restarting that proggie. It will keep Java
RMI program running.
Child Handler:
if($CHILD == 1) {
my $child_pid = wait;
my $status = $?;
foreach my $ref (sort keys %pids) {
if($child_pid == $ref) {
print "Process $pids{$ref}{'name'} exited!\n";
print " CMD: $pids{$ref}{'cmd'} $pids{$ref}{'args'}\n";
}
}
$CHILD = 0;
}
Thanks,
Chris
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00991" href="msg00991.html">[ale] attaching an array to a hash</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00986.html">[ale] New Topic</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00988.html">[ale] New Topic</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00990.html">[ale] New Topic</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00991.html">[ale] attaching an array to a hash</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00987"><strong>Date</strong></a></li>
<li><a href="threads.html#00987"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>