Process::Infinite - Base class for processes that do not naturally end
Process::Infinite is a base class for Process objects that will not naturally finish without provocation from outside the process.
Examples of this are system "daemons" and servers of various types.
At the present time this class is purely indicative. It contains no additional functionality.
When writing a
the most important thing to note is how you plan to shutdown your process.
This will vary from case to case but the general implementation tends to be the same.
run class consists of a main loop.
How often this loop will fire will vary,
but it should generally fire at least once a second or so.
The loop will check a flag or do some other cheap task to know if it is time to stop, then shutdown gracefully. You will then add some form of signal handler that sets the shutdown flag.
On UNIX platforms,
you should at the very least add a signal handler for
as this is what will be sent to you by the operating system when it shuts down.
(If you don't respond in a few seconds,
it will then
SIGKILL and take out your running process by force,
with no chance for you to shut down gracefully)
Bugs should be reported via the CPAN bug tracker at
For other issues, contact the author.
Adam Kennedy <email@example.com>
Copyright 2006 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.