Hi Monks,
Next to an Apache/mod_perl combo I'm running a small daemon for continuous number crunching.
Both Apache and the daemon are very related.
The daemon is currently started and stopped through its own "daemonctl" script.
Now I'm searching for a solution to get the small daemon started and stoppen through Apache.
Starting is quite easy through "startup.pl" and a few other ways.
But to get it stopped is not that easy!
The only solution that came to my mind was to check the pid file of the Apache whenever the daemon reaches the end of its main loop. (not very elegant)
A wrapper script for both "apachectl" and "daemonctl" is ugly too.
I checked a lot of documentations/books/tutorials but found no direct way like a special cleanup/shutdown handler or the like.
Think i saw a note somewhere that Apache itself has no such handler.
Any suggestions for a clean solution?
(No matter which version of apache/mod_perl)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.