Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Mar 2001 18:59:10 -0500
From:      Sergey Babkin <babkin@bellatlantic.net>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Wilko Bulte <wkb@freebie.demon.nl>, Ian Dowse <iedowse@maths.tcd.ie>, "Justin T. Gibbs" <gibbs@scsiguy.com>, Robert Watson <rwatson@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/reboot reboot.c
Message-ID:  <3ABBE34E.3F76B476@bellatlantic.net>
References:  <200103230315.f2N3FgR04938@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers wrote:
> 
> > Wilko Bulte wrote:
> > >
> > > On Fri, Mar 23, 2001 at 08:07:36AM +1100, Peter Jeremy wrote:
> >
> > > > Instead of moving the common functionality into a common library,
> > > > why not move it into a common process.  Why can't reboot(8) just
> > > > ask init(8) to massacre all the processes and reboot?  (Or, vice
> > > > versa, init could spawn reboot(8) to do the same thing).
> > >
> > > Isn't that what a SysV init does?
> >
> > No, it calls uadmin for actual reboot/shutdown.
> 
> Under sysv the uadmin() args are determined by the signal that's sent
> to init.

Actually there is an uadmin binary that does the uadmin() call.
In inittab it's listed as the last process to start in states
0, 5, 6 - with appropriate arguments.
 
> It's possible for any process (with the correct credentials)
> to call uadmin - I believe reboot and halt both call uadmin()

Yes.

> directly.  AFAIK the only thing on sysv that mucks around with
> killing processes and init scripts is init itself.

Yes, I believe so too.

-SB

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ABBE34E.3F76B476>