From: "L. Jason Godsey" <lannygodsey@yahoo.com>
Subject: Re: Trying to alter runit a little.
Date: Fri, 18 Nov 2005 03:07:04 -0800 (PST) [thread overview]
Message-ID: <20051118110704.67248.qmail@web33306.mail.mud.yahoo.com> (raw)
In-Reply-To: <20051117085412.28856.qmail@61a53ad4699a19.315fe32.mid.smarden.org>
build# diff -u runit.c.original runit.c
--- runit.c.original Fri Nov 18 10:56:29 2005
+++ runit.c Fri Nov 18 10:57:41 2005
@@ -54,7 +54,7 @@
int ttyfd;
struct stat s;
- if (getpid() != 1) strerr_die2x(111, FATAL, "must be run as process
no 1.");
+ //if (getpid() != 1) strerr_die2x(111, FATAL, "must be run as
process no 1.");
setsid();
sig_block(sig_alarm);
build# pwd
/usr/ports/sysutils/runit/work/admin/runit-1.3.1/src
build# make check
./check-local chpst runit runit-init runsv runsvchdir runsvctrl
runsvdir runsvstat sv svlogd svwaitdown svwaitup utmpset
Checking chpst...
Checking runit...
Killed
main# echo $?
137
#### Original
build# cp runit.c.original runit.c
./check-local chpst runit runit-init runsv runsvchdir runsvctrl
runsvdir runsvstat sv svlogd svwaitdown svwaitup utmpset
Checking chpst...
Checking runit...
Checking runit-init...
Checking runsv...
Checking runsvchdir...
Checking runsvctrl...
Checking runsvdir...
...
Something in Checking runit is making my FreeBSD 6 system have a stroke
if I remove the line:
if (getpid() != 1) strerr_die2x(111, FATAL, "must be run as process no
1.");
--- Gerrit Pape <pape@smarden.org> wrote:
> On Sat, Nov 12, 2005 at 07:02:24AM -0800, L. Jason Godsey wrote:
> > I've removed the requirment for runit to be pid 1. I want to
> replace
> > init within a FreeBSD jail. The first process to run isn't pid 1.
> >
> > Do you see any problems that will become of this?
>
> The runit-init program, normally installed as /sbin/init sends
> signals
> to pid 1 when told to reboot or halt the system. The runit program
> doesn't provide any other communication channel than signals
> (combined
> with magic files), so it relies on being the process with id 1. If
> you
> change that, nothing else should break but this IPC, but you then
> have
> the problem to find out the id of the runit process on shutdown.
> Tools
> like pidof are exactly what runit replaces with a reliable solution.
>
> > I just did a make package outside of the jail and the system froze,
> I'm
> > guessing the build process checks for error if runit is not pid 1.
> >
> > The machine locked up and I'll have to wait a few hours for someone
> to
> > go to the colo machine and power cycle it for me.
>
> I can't see how this relates to your change, building the package
> should
> never make the system hang, unless the system is buggy.
>
> Regards, Gerrit.
>
next prev parent reply other threads:[~2005-11-18 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-12 15:02 L. Jason Godsey
2005-11-17 8:59 ` Gerrit Pape
2005-11-17 22:46 ` Paul Jarc
2005-11-21 8:59 ` Gerrit Pape
2005-11-22 6:37 ` Paul Jarc
2005-11-18 11:07 ` L. Jason Godsey [this message]
2005-11-21 8:56 ` Gerrit Pape
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=20051118110704.67248.qmail@web33306.mail.mud.yahoo.com \
--to=lannygodsey@yahoo.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).