Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ANN: dh, the daemon helper 2009-09-04

Thread Tools

ANN: dh, the daemon helper 2009-09-04

John Kelly
Posts: n/a

dh, the daemon helper

The daemon helper starts any program or script as a daemon. It's a
small C program with a simple interface and a liberal license.

Get the files and do:

make install clean

To build and install dh. Don't try to run the Sh.install script
directly, it must be invoked using the Makefile.

I use dh for starting scripts which read fifos fed by syslog. They
block on read until syslog provides data to work on. They never end,
and need help to start as "daemons."

But that's just one example. There are many other potential uses for
the daemon helper.

I use dh on Linux, but was curious about portability. With some minor
changes, I compiled and installed it on NetBSD 5.0.1 x86. So now it's
portable. Wheee!

It's a cool tool, it reports problems encountered when trying to exec
the target daemon program or script. Debian's start-stop-deamon can't
do that, nor can any other daemon tool I know of.

It's minimal, with only one command line option, -p. Avoiding unneeded
bells and whistles was my intentional design.

In six months time, I could lose interest in computers, start a new
career, and the work would be lost forever. Someone who likes C more
than I do should adopt dh and help it grow.

But if you do, don't believe what Stevens wrote about ignoring SIGHUP
before the second fork(). It's not true, so don't write voodoo code to
handle it! See the thread in c.u.p with the subject "Orphaned process
groups, daemon startup, SIGHUP."

If you can't adopt dh, but have ideas for patches, send them. But if I
don't respond, well then, you're on your own.

There is no man page for dh, but the README explains how to use it.

If there is enough interest, maybe someday I will give dh an official
version number and use some version control. But for now, the date of
last modification is all there is.

dh is its name; a natural companion to sh.

Webmail for Dialup Users

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dh, the daemon helper John Kelly C Programming 45 10-09-2009 11:37 AM
dh, the daemon helper 2009-09-11 John Kelly C Programming 3 09-14-2009 08:00 AM
ANN: dh, the daemon helper John Kelly Python 2 09-10-2009 06:57 PM
Re: dh, the daemon helper C Programming 5 11-03-2008 10:35 AM
What's the purpose of the helper cache and is there a way to just turn off helper cache-ing? kevin Ruby 1 07-21-2006 03:42 AM