From: Dean Hall <dean-lists@deanpence.com>
Subject: Re: Who actually gets the TERM signal in "runsvctrl down"?
Date: Fri, 25 Jun 2004 11:13:19 -0500 [thread overview]
Message-ID: <40DC4F1F.1080604@deanpence.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0406251029110.11857-100000@e-smith.charlieb.ott.istop.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Charlie,
Just some notes and questions for my own edification, somewhat unrelated
to the original post.
Charlie Brady wrote:
| The better way is runit/daemontools. runsvctrl is just a shell script
| which tries to do what runsv is already able to do reliably. It
delivers a
| signal to the session leading httpd process, which it has hopefully found
| by way of a pid file. That process then "does the right thing" with its
| children.
I'm not sure what you mean when you say that runsvctrl does what runsv
already does. As I understand it, it's the Right Thing To Do to send
signals to your service process (or in the case of "u", "d" and "x", to
runsv itself).
(Also, runsvctrl doesn't appear to be a shell script, at least not in
runit-1.0.2.)
| For "apachectl stop", just do "runsvctrl down apache". For "apachectl
| graceful", do "runsvctrl 1 apache; raunsvctrl u apache". For "apachectrl
| restart", do "runsvctrl t apache; raunsvctrl u apache". Etc.
Why are you doing the additional "u"? As I understand it, sending a "u"
to the fifo is really necessary if the service is marked as down. If
after sending any signal to the process it dies/crashes, runsv should
restart it automatically. Does runsv not always do this? (I've never had
any trouble.) If not, sounds like a major bug, as that's what it's
supposed to do.
So when I restart apache, I just do:
runsvctrl t /service/httpd
BTW, I recommend running apache2 with pgrphack so it won't kill other
things when you kill it. Apache 1.3 doesn't seem to have this problem. I
know it has something to do with being the session leader (a la sid()),
but I'm not a Linux systems programmer (nor really a C programmer) and
am not sure what all that entails.
Dean
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFA3E8fBnn70KGO4CURAuiZAJ400njbPJycCOLp2lNVnJhte5eMyQCggO7u
GZuZ/z8VC1nYlcarfnrZQzA=
=QqIc
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2004-06-25 16:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-25 14:01 Lloyd Zusman
2004-06-25 15:33 ` Charlie Brady
2004-06-25 16:03 ` Lloyd Zusman
2004-06-25 16:11 ` Charlie Brady
2004-06-25 16:36 ` Lloyd Zusman
2004-06-25 17:15 ` Paul Jarc
2004-06-26 0:26 ` Scott Gifford
2004-06-26 1:39 ` Lloyd Zusman
2004-06-26 2:17 ` Charlie Brady
2004-06-26 2:44 ` Lloyd Zusman
2004-06-26 3:01 ` Lloyd Zusman
2004-06-26 4:03 ` Lloyd Zusman
2004-06-26 8:17 ` Thomas Schwinge
2004-06-26 15:45 ` Charlie Brady
2004-06-25 18:27 ` Charlie Brady
2004-06-25 19:13 ` Lloyd Zusman
2004-06-25 19:48 ` Charlie Brady
2004-06-26 3:49 ` Paul Jarc
2004-06-26 21:10 ` Lloyd Zusman
2004-06-25 18:40 ` Jim Zajkowski
2004-06-25 16:13 ` Dean Hall [this message]
2004-06-25 16:17 ` Charlie Brady
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=40DC4F1F.1080604@deanpence.com \
--to=dean-lists@deanpence.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).