From: Alex Efros <powerman@powerman.asdfGroup.com>
Subject: Re: daemon under runit?
Date: Wed, 6 Dec 2006 15:46:16 +0200 [thread overview]
Message-ID: <20061206134616.GA17175@home.power> (raw)
In-Reply-To: <20061205223442.10292.qmail@oak.oeko.net>
Hi!
On Tue, Dec 05, 2006 at 11:34:42PM +0100, Toni Mueller wrote:
> I'm struggling with a program that, in many cases, forks to become a
"in many cases"?! I.e. it fork sometimes and sometimes don't fork?! ;-)
> daemon, that I'd like to run under runit (1.7.1). So far, I tried to
> start the program in the run script, then wait in a 'finish' script for
> it, and also have a control/t script to kill it if someone says
> something like "sv down service". Unfortunately, in most cases, this
> does not seem to work - the control/t script is not accessed when I
> issue 'sv down service' (as "ls -lta" shows). One of the problems is
You should use control/d instead of control/t if you wish to catch `sv down`.
> that the file supervise/pid contains the pid of the finish script in
> case the program forked, no longer the pid of the daemon itself. I
> hoped to achieve something similar to fghack (from daemontools), but so
> far failed.
It's usually simple enough to patch any program to not fork.
--
WBR, Alex.
next prev parent reply other threads:[~2006-12-06 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 22:34 Toni Mueller
2006-12-06 13:46 ` Alex Efros [this message]
2006-12-14 13:02 ` Toni Mueller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061206134616.GA17175@home.power \
--to=powerman@powerman.asdfgroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).