[Pdx-pm] Writing Daemons with Perl?

Steve Bonds 9nn24e402 at sneakemail.com
Wed Mar 9 13:33:22 PST 2005


On Wed, 9 Mar 2005 21:44:54 +0000, brendan-at-hollyking.org wrote:

> I have a program that I need to convert to run as a daemon.  That's the
> easy part, I found some web pages that showed me how to make the
> conversion.
> 
> The information I can't seem to find is how to handle communicating with
> the program.  What's a good way to make sure it can shutdown
> gracefully, reload if the configuration file is changed and things like
> that?
> 
> Can anyone point me to a book or websites that might have information on
> writing daemons?  I can make the conversion to Perl if the necessary.

The book "Advanced Programming in the UNIX environment" by W. Richard
Stevens has an excellent section on daemon programming for UNIX.  The
examples are all in C, but the principles are the same.

For info on finding this book, try:

http://en.wikipedia.org/wiki/Special:Booksources/0201563177

I didn't find it at the Multnomah or Washington county libraries. 
Amazon has it, though it's a bit pricey:

http://www.amazon.com/exec/obidos/tg/detail/-/0201563177

This book is an excellent general reference for UNIX programming and
covers a lot of the nasty topics like interprocess communication,
multiprocessing, signals, etc.

  -- Steve


More information about the Pdx-pm-list mailing list