dh, the daemon helper

J

John Kelly

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.

ftp://ftp.isp2dial.com/users/jak/src/dh/

Get the files and:

make install clean

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

Kaz Kylheku

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.

You can do this nicely with a larger program called "screen".

Oldie, goodie.

With screen you can run a program in a detached screen session,
non-interactively.

Your program gets a controlling tty, to which you can attach later. Screen
gives you a virtual console where you can see recent output from the program or
even review the scrollback history.

So you don't have to do all that Unix daemonizing crap in your program
(detaching from a controlling tty, closing stdin and stdout, etc).
 
M

Michael Foukarakis

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.

ftp://ftp.isp2dial.com/users/jak/src/dh/

Get the files and:

make install clean

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

The stuff homeworks are made of.
 
J

John Kelly

You can do this nicely with a larger program called "screen".
So you don't have to do all that Unix daemonizing crap in your program
(detaching from a controlling tty, closing stdin and stdout, etc).

Sometimes I use screen, but it's not always what I want.

There are other daemon tools too, but I had certain ideas about how one
should work, so I wrote dh.
 
J

jacob navia

John Kelly a écrit :
Sometimes I use screen, but it's not always what I want.

There are other daemon tools too, but I had certain ideas about how one
should work, so I wrote dh.

And you are offering it to the community.

Thanks.
 
J

John Kelly

And you are offering it to the community. Thanks.

I've been using dh on Linux, but I had some time to waste, and got
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.

Get it while it's hot ...

ftp://ftp.isp2dial.com/users/jak/src/dh/
 
K

Keith Thompson

John Kelly said:
I've been using dh on Linux, but I had some time to waste, and got
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 sounds like it's portable only to Unix-like systems.

You might consider posting to comp.unix.programmer.
 
J

John Kelly

It sounds like it's portable only to Unix-like systems.
Probably.


You might consider posting to comp.unix.programmer.

I wonder what systems usage prevails among readers of this ng. Not
sure, but I am sure this ng has more readers than c.u.p. You know they
say there's no such thing as bad publicity.

And those brainiacs over in c.u.p scare me. ;-)
 
J

jameskuyper

John said:
....

I wonder what systems usage prevails among readers of this ng. Not
sure, but I am sure this ng has more readers than c.u.p. ...

There are a great many newsgroups that have more readers than c.u.p;
according to Google the currently most active usenet group is
alt.suicide.holiday, with 19087 messages per month. that doesn't make
a.s.h an appropriate places to post messages that are unix-specific.
... You know they
say there's no such thing as bad publicity.

The people who say that are PR types; for the rest of us, all
publicity that publicizes anything we're not interested in a waste of
our time.
 
J

John Kelly

John Kelly wrote:
There are a great many newsgroups that have more readers than c.u.p;
according to Google the currently most active usenet group is
alt.suicide.holiday, with 19087 messages per month. that doesn't make
a.s.h an appropriate places to post messages that are unix-specific.

Well I didn't post to an obviously unrelated ng. Eh?

The people who say that are PR types; for the rest of us, all
publicity that publicizes anything we're not interested in a waste of
our time.

c.u.p is not limited to C programming. They discuss a variety of unix
topics. So dh can't be entirely on topic there either.

dh is written in C. That makes it topical for discussion here. I see
discussion in this ng less topical than dh. If you're the topic police,
please apprehend them.
 
K

Keith Thompson

John Kelly said:
On Wed, 9 Sep 2009 10:43:33 -0700 (PDT), jameskuyper
c.u.p is not limited to C programming. They discuss a variety of unix
topics. So dh can't be entirely on topic there either.

Sure it can. C programming for Unix is one of the "variety of unix
topics" they discuss there, probably the most important one.
dh is written in C. That makes it topical for discussion here. I see
discussion in this ng less topical than dh. If you're the topic police,
please apprehend them.

The topicality guidelines for this newsgroup have been determined over
many years by general consensus of (most of) the regular participants.
Not everything written in C is considered topical here.
 
J

jameskuyper

John said:
Well I didn't post to an obviously unrelated ng. Eh?



c.u.p is not limited to C programming. They discuss a variety of unix
topics. So dh can't be entirely on topic there either.


dh is written in C. That makes it topical for discussion here. I see
discussion in this ng less topical than dh. If you're the topic police,
please apprehend them.

There's no official charter for this newsgroup, just an out-of-date
description of what the newsgroup is for that was posted long before
newsgroups had charters, and before this newsgroup's name was changed
to it's current one. There's no official topicality rules, and no
consensus about what they should be. There was a discussion many
months ago about what the topicality guidelines should be, but
essentially all of the most vocal critics of the very concept of
"topicality" refused to participate in any meaningful sense in that
discussion, so the "consensus" reached by that discussion was not
really a consensus of the group.

That is why I prefer to avoid talking about topicality, as such.
Instead, I prefer to talk about where you can get the best answers to
questions about specific kinds of topics. For unix specific questions
about C programming, you'll get better results in a newsgroup devoted
to Unix than in one devoted to C. That's because most of the more
complicated issues that such code can raise tend to be unix-specific
rather than C-specific. Also, most Unix programmers are at least
somewhat knowlegeable about C; a large fraction of the C programmers
not at all familiar with Unix.
 
J

John Kelly

C programming for Unix is one of the "variety of unix topics" they
discuss there, probably the most important one.

If you're a spokesman for c.u.p, I'll tell them you sent me. Then maybe
they won't bite.

The topicality guidelines for this newsgroup have been determined over
many years by general consensus of (most of) the regular participants.
Not everything written in C is considered topical here.

A vocal minority of regulars may claim consensus without submitting a
vote to the general population. google groups says:

comp.lang.c
Discussion about C.
13833 members

That's a lot of readers. I think it's best to ignore threads you're not
interested in. Every time I reply, people see my subject again ...
 
J

John Kelly

That is why I prefer to avoid talking about topicality, as such.
Instead, I prefer to talk about where you can get the best answers to
questions about specific kinds of topics. For unix specific questions
about C programming, you'll get better results in a newsgroup devoted
to Unix than in one devoted to C. That's because most of the more
complicated issues that such code can raise tend to be unix-specific
rather than C-specific. Also, most Unix programmers are at least
somewhat knowlegeable about C; a large fraction of the C programmers
not at all familiar with Unix.

I hear you.

But I want extra publicity for dh. There's no money in it for me. I
just want dh to keep living after I'm gone. So I'm not going to beat it
to death before I go ...
 
J

jameskuyper

John said:
....

That's a lot of readers. I think it's best to ignore threads you're not
interested in. Every time I reply, people see my subject again ...

By far the easiest and least time-consuming way to ignore threads
you're not interested in is to not subscribe to newsgroups where such
threads would be on-topic. Your approach to newsgroup topicality makes
that approach to ignoring threads ineffective.
 
K

Keith Thompson

John Kelly said:
If you're a spokesman for c.u.p, I'll tell them you sent me. Then maybe
they won't bite.

I am not a spokesman for any newsgroup. Unmoderated newsgroups don't
have spokesmen.

Why are you concerned about them biting you? Aside from the
obvious point that biting is not physically possible over Usenet,
c.u.p is generally not an unfriendly newsgroup. If you post there,
you'll probably get some combination of intelligent discussion,
constructive criticism, flaming, and trolling; you'll probably get
less of the latter there than you would here.

[snip]

You've written a program that's specific to Unix. Several people
have told you that comp.unix.programmer is probably the best place
to discuss it. Why are you so resistant to the idea?
 
J

John Kelly

You've written a program that's specific to Unix. Several people
have told you that comp.unix.programmer is probably the best place
to discuss it. Why are you so resistant to the idea?

Some time ago, I posted dh there. I learned from the thread, and since
then, I've made significant improvements to dh.

I'm just a worker who likes to build things. I'm not as smart as they
are. But maybe I can return.
 
J

jacob navia

John Kelly a écrit :
Some time ago, I posted dh there. I learned from the thread, and since
then, I've made significant improvements to dh.

I'm just a worker who likes to build things. I'm not as smart as they
are. But maybe I can return.

This is correct. Do not pay attention to the trolls.

You contributed something and people can learn from you.
 
S

Seebs

dh is topical. It's written in C.

The topic of this group is not "programs which happen to have been implemented
in C" but "C programming".

If you can't grasp this distinction, I think it safe to assume that your code
is pretty poor too, and that anything you are advertising this way is probably
of negative value.

-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top