* Re: [gentoo-dev] strange gentoo shutdown sequence
@ 2004-05-02 17:32 William Hubbs
2004-05-03 5:10 ` John Nilsson
2004-05-03 16:24 ` splite-gentoo
0 siblings, 2 replies; 22+ messages in thread
From: William Hubbs @ 2004-05-02 17:32 UTC (permalink / raw
To: gentoo development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
On Sun, May 02, 2004 at 01:40:08PM +0200, Sven K?hler wrote:
> hi,
>
> gentoo usually does the following if i execute halt or reboot:
>
> sending all processes the TERM signal
> sending all processes the KILL signal
> stopping xdm ...
> stopping alsasound ...
> etc....
>
> in may eyes, this has to be the other way round:
> first shutdown all deamons properly with the init.d-script, and than
> send the remaining processes the TERM and KILL signals.
>
>
> why does gentoo handle things the way it does? redhat etc. do it the
> other way i described. using the init.d-script sounds more resonable to me.
I just confirmed this. When you do a shutdown or a reboot or halt, the processes are killed by the kill and term signals before the services are actually stopped with the /etc/init.d/* scripts.
Is there a reason for this or should it be the other way around?
William
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAlTCnblQW9DDEZTgRAhpFAKCHZKYcQ7pf3cW8k8cFSIwCSYOOxACfWb3z
FwWqFEXh6xyd6I8prHhvi6E=
=31D5
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-02 17:32 [gentoo-dev] strange gentoo shutdown sequence William Hubbs
@ 2004-05-03 5:10 ` John Nilsson
2004-05-03 6:15 ` Olivier Crête
2004-05-03 16:24 ` splite-gentoo
1 sibling, 1 reply; 22+ messages in thread
From: John Nilsson @ 2004-05-03 5:10 UTC (permalink / raw
To: William Hubbs; +Cc: gentoo development
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
While on the topic:
Is it resonable to patch gdm so that /etc/init.d/xdm is zapped after
gdm is killed by selecting reboot/shutdown from the login screen?
It just annoys me that the script errors while shutting down.
-John
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 5:10 ` John Nilsson
@ 2004-05-03 6:15 ` Olivier Crête
2004-05-03 6:46 ` John Nilsson
2004-05-03 8:30 ` Paul de Vrieze
0 siblings, 2 replies; 22+ messages in thread
From: Olivier Crête @ 2004-05-03 6:15 UTC (permalink / raw
To: John Nilsson; +Cc: gentoo development
[-- Attachment #1: Type: text/plain, Size: 828 bytes --]
On Mon, 2004-05-03 at 07:10, John Nilsson wrote:
> While on the topic:
> Is it resonable to patch gdm so that /etc/init.d/xdm is zapped after
> gdm is killed by selecting reboot/shutdown from the login screen?
> It just annoys me that the script errors while shutting down.
This is imho a misfeature of the current initscripts system. The
started-ness of an application is only checked against a file and not
against the current real status. We should probably add a possible
"status()" function to them (that would default to true) that would
check if the service is still running in a custom way.. And zap it if it
isnt... The problem there is with dependencies, should they be stopped
if the service died? But the current system is clearly broken..
--
Olivier Crête
tester@gentoo.org
Gentoo Developer
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 6:15 ` Olivier Crête
@ 2004-05-03 6:46 ` John Nilsson
2004-05-03 17:22 ` Grant Goodyear
2004-05-03 8:30 ` Paul de Vrieze
1 sibling, 1 reply; 22+ messages in thread
From: John Nilsson @ 2004-05-03 6:46 UTC (permalink / raw
To: Olivier Crête; +Cc: gentoo development
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
I remember a time when gentoo (enoch?) used djb's daemontools to manages
services. Why was this changed?
-John
On Mon, 2004-05-03 at 08:15, Olivier Crête wrote:
> On Mon, 2004-05-03 at 07:10, John Nilsson wrote:
> > While on the topic:
> > Is it resonable to patch gdm so that /etc/init.d/xdm is zapped after
> > gdm is killed by selecting reboot/shutdown from the login screen?
> > It just annoys me that the script errors while shutting down.
>
>
> This is imho a misfeature of the current initscripts system. The
> started-ness of an application is only checked against a file and not
> against the current real status. We should probably add a possible
> "status()" function to them (that would default to true) that would
> check if the service is still running in a custom way.. And zap it if it
> isnt... The problem there is with dependencies, should they be stopped
> if the service died? But the current system is clearly broken..
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 6:15 ` Olivier Crête
2004-05-03 6:46 ` John Nilsson
@ 2004-05-03 8:30 ` Paul de Vrieze
2004-05-03 8:50 ` Allen D Parker
1 sibling, 1 reply; 22+ messages in thread
From: Paul de Vrieze @ 2004-05-03 8:30 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 03 May 2004 08:15, Olivier Crête wrote:
> On Mon, 2004-05-03 at 07:10, John Nilsson wrote:
> > While on the topic:
> > Is it resonable to patch gdm so that /etc/init.d/xdm is zapped
> > after gdm is killed by selecting reboot/shutdown from the login
> > screen? It just annoys me that the script errors while shutting
> > down.
>
> This is imho a misfeature of the current initscripts system. The
> started-ness of an application is only checked against a file and not
> against the current real status. We should probably add a possible
> "status()" function to them (that would default to true) that would
> check if the service is still running in a custom way.. And zap it if
> it isnt... The problem there is with dependencies, should they be
> stopped if the service died? But the current system is clearly
> broken..
I agree, I think we should enhance the init scripts with another function
that can check the status of a daemon (in some way) and as such also
does not complain when a died daemon needs to be started.
Paul
- --
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAlgMYbKx5DBjWFdsRAmOTAKDnA9E0PAVsCtMFAFJIkeKbLuJX/ACcDoCK
k3gzkzUnrA0n2unCEEpERH0=
=+tIc
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 8:30 ` Paul de Vrieze
@ 2004-05-03 8:50 ` Allen D Parker
2004-05-03 9:05 ` Paul de Vrieze
0 siblings, 1 reply; 22+ messages in thread
From: Allen D Parker @ 2004-05-03 8:50 UTC (permalink / raw
To: Paul de Vrieze; +Cc: gentoo-dev
We can actually probably do this in bash fairly simply (although unless
each service is started in sequence or in a seperate shellspace, it might
be a problem) parallel start + bash variables = nastiness.
for each initscript SVCNAME="apache2"
then in the actual runscript, something like this would do just fine
(imho) for 99% of what would need to be supported:
SVCHOME=`whereis ${SVCNAME} | cut -d " " -f 2`
if ${SVCNAME} != `ps aux | grep ${SVCHOME}`; then
/etc/init.d/${SVCNAME} zap &&
/etc/init.d/${SVCNAME} start
else
SVC_STATUS="alive"
fi
Allen Parker
(temporarily off my windows box :( i borked my raid firmware last night)
On Mon, 3 May 2004, Paul de Vrieze wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 03 May 2004 08:15, Olivier Crête wrote:
> > On Mon, 2004-05-03 at 07:10, John Nilsson wrote:
> > > While on the topic:
> > > Is it resonable to patch gdm so that /etc/init.d/xdm is zapped
> > > after gdm is killed by selecting reboot/shutdown from the login
> > > screen? It just annoys me that the script errors while shutting
> > > down.
> >
> > This is imho a misfeature of the current initscripts system. The
> > started-ness of an application is only checked against a file and not
> > against the current real status. We should probably add a possible
> > "status()" function to them (that would default to true) that would
> > check if the service is still running in a custom way.. And zap it if
> > it isnt... The problem there is with dependencies, should they be
> > stopped if the service died? But the current system is clearly
> > broken..
>
> I agree, I think we should enhance the init scripts with another function
> that can check the status of a daemon (in some way) and as such also
> does not complain when a died daemon needs to be started.
>
> Paul
>
> - --
> Paul de Vrieze
> Gentoo Developer
> Mail: pauldv@gentoo.org
> Homepage: http://www.devrieze.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
> iD8DBQFAlgMYbKx5DBjWFdsRAmOTAKDnA9E0PAVsCtMFAFJIkeKbLuJX/ACcDoCK
> k3gzkzUnrA0n2unCEEpERH0=
> =+tIc
> -----END PGP SIGNATURE-----
>
> --
> gentoo-dev@gentoo.org mailing list
>
>
>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 8:50 ` Allen D Parker
@ 2004-05-03 9:05 ` Paul de Vrieze
2004-05-05 18:11 ` Martin Schlemmer
0 siblings, 1 reply; 22+ messages in thread
From: Paul de Vrieze @ 2004-05-03 9:05 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 03 May 2004 10:50, Allen D Parker wrote:
> We can actually probably do this in bash fairly simply (although
> unless each service is started in sequence or in a seperate
> shellspace, it might be a problem) parallel start + bash variables =
> nastiness.
>
> for each initscript SVCNAME="apache2"
> then in the actual runscript, something like this would do just fine
> (imho) for 99% of what would need to be supported:
>
> SVCHOME=`whereis ${SVCNAME} | cut -d " " -f 2`
> if ${SVCNAME} != `ps aux | grep ${SVCHOME}`; then
> /etc/init.d/${SVCNAME} zap &&
> /etc/init.d/${SVCNAME} start
> else
> SVC_STATUS="alive"
> fi
I was more thinking of providing an extra function (say "status()") that
would have a positive result if the service is actually running and a
negative result if it is not. The handler script/program should then be
able to handle this function.
Paul
- --
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAlgtrbKx5DBjWFdsRAhbPAKC1Odou8xvkbFDq88+XZWsHn61ZmQCeLZFu
mWaX+8vIxnS8J8QNcXd6s84=
=6SqF
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-03 9:05 ` Paul de Vrieze
@ 2004-05-05 18:11 ` Martin Schlemmer
0 siblings, 0 replies; 22+ messages in thread
From: Martin Schlemmer @ 2004-05-05 18:11 UTC (permalink / raw
To: Paul de Vrieze; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
On Mon, 2004-05-03 at 11:05, Paul de Vrieze wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 03 May 2004 10:50, Allen D Parker wrote:
> > We can actually probably do this in bash fairly simply (although
> > unless each service is started in sequence or in a seperate
> > shellspace, it might be a problem) parallel start + bash variables =
> > nastiness.
> >
> > for each initscript SVCNAME="apache2"
> > then in the actual runscript, something like this would do just fine
> > (imho) for 99% of what would need to be supported:
> >
> > SVCHOME=`whereis ${SVCNAME} | cut -d " " -f 2`
> > if ${SVCNAME} != `ps aux | grep ${SVCHOME}`; then
> > /etc/init.d/${SVCNAME} zap &&
> > /etc/init.d/${SVCNAME} start
> > else
> > SVC_STATUS="alive"
> > fi
>
> I was more thinking of providing an extra function (say "status()") that
> would have a positive result if the service is actually running and a
> negative result if it is not. The handler script/program should then be
> able to handle this function.
>
There is one that can be overridden. Also have a look at
/lib/rcscripts/sh/rc-daemon.sh - yeah, its crude, its very alpha (did
it in a night some months back), but it was supposed to be generic
daemon handling, with checking of pid, etc.
--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] strange gentoo shutdown sequence
2004-05-02 17:32 [gentoo-dev] strange gentoo shutdown sequence William Hubbs
2004-05-03 5:10 ` John Nilsson
@ 2004-05-03 16:24 ` splite-gentoo
2004-05-04 15:13 ` [gentoo-dev] " Sven Köhler
2004-05-04 15:16 ` Sven Köhler
1 sibling, 2 replies; 22+ messages in thread
From: splite-gentoo @ 2004-05-03 16:24 UTC (permalink / raw
To: gentoo development
On Sun, May 02, 2004 at 12:32:23PM -0500, William Hubbs wrote:
> Hi all,
>
> On Sun, May 02, 2004 at 01:40:08PM +0200, Sven K?hler wrote:
> > hi,
> >
> > gentoo usually does the following if i execute halt or reboot:
> >
> > sending all processes the TERM signal
> > sending all processes the KILL signal
> > stopping xdm ...
> > stopping alsasound ...
> > etc....
> >
> > in may eyes, this has to be the other way round:
> > first shutdown all deamons properly with the init.d-script, and than
> > send the remaining processes the TERM and KILL signals.
> >
> >
> > why does gentoo handle things the way it does? redhat etc. do it the
> > other way i described. using the init.d-script sounds more resonable to me.
>
> I just confirmed this. When you do a shutdown or a reboot or halt, the processes are killed by the kill and term signals before the services are actually stopped with the /etc/init.d/* scripts.
>
> Is there a reason for this or should it be the other way around?
init(8) itself sends the TERM and KILL signals when changing runlevels, and
there's no way around that, save patching init.
It's not a real problem because init only signals processes still in init's
process group, and there usually aren't any. (Run "ps -eo pid,pgrp,cmd" to
see if any are, if you're curious.)
"man init" for more info.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-03 16:24 ` splite-gentoo
@ 2004-05-04 15:13 ` Sven Köhler
2004-05-04 15:33 ` splite-gentoo
2004-05-04 15:16 ` Sven Köhler
1 sibling, 1 reply; 22+ messages in thread
From: Sven Köhler @ 2004-05-04 15:13 UTC (permalink / raw
To: gentoo-dev
> It's not a real problem because init only signals processes still in init's
> process group, and there usually aren't any. (Run "ps -eo pid,pgrp,cmd" to
> see if any are, if you're curious.)
well why is the shell inside my gnome-terminal killed (and restarted by
gnome-terminal over and over again) if i execute halt?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:13 ` [gentoo-dev] " Sven Köhler
@ 2004-05-04 15:33 ` splite-gentoo
2004-05-04 16:00 ` Sven Köhler
0 siblings, 1 reply; 22+ messages in thread
From: splite-gentoo @ 2004-05-04 15:33 UTC (permalink / raw
To: gentoo-dev
On Tue, May 04, 2004 at 05:13:52PM +0200, Sven K?hler wrote:
> >It's not a real problem because init only signals processes still in init's
> >process group, and there usually aren't any. (Run "ps -eo pid,pgrp,cmd" to
> >see if any are, if you're curious.)
>
> well why is the shell inside my gnome-terminal killed (and restarted by
> gnome-terminal over and over again) if i execute halt?
Because halt also signals all processes, independently of init. Look at
the top of /etc/init.d/halt.sh:
| ebegin "Sending all processes the TERM signal"
| killall5 -15 &> /dev/null
| eend $?
| sleep 5
| ebegin "Sending all processes the KILL signal"
| killall5 -9 &> /dev/null
| eend $?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:33 ` splite-gentoo
@ 2004-05-04 16:00 ` Sven Köhler
2004-05-04 16:30 ` Jon Portnoy
0 siblings, 1 reply; 22+ messages in thread
From: Sven Köhler @ 2004-05-04 16:00 UTC (permalink / raw
To: gentoo-dev
>>well why is the shell inside my gnome-terminal killed (and restarted by
>>gnome-terminal over and over again) if i execute halt?
>
> Because halt also signals all processes, independently of init. Look at
> the top of /etc/init.d/halt.sh:
>
> | ebegin "Sending all processes the TERM signal"
> | killall5 -15 &> /dev/null
> | eend $?
> | sleep 5
> | ebegin "Sending all processes the KILL signal"
> | killall5 -9 &> /dev/null
> | eend $?
OK, but that doesn't make sense to me too.
I want to write a init-script to start/stop UML-machines. I wan't the
UMLs to be gracefully shutdown. I cannot take the risk of data-loss due
to an UML getting killed.
BTW: UML=UserModeLinux
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 16:00 ` Sven Köhler
@ 2004-05-04 16:30 ` Jon Portnoy
0 siblings, 0 replies; 22+ messages in thread
From: Jon Portnoy @ 2004-05-04 16:30 UTC (permalink / raw
To: Sven Köhler; +Cc: gentoo-dev
On Tue, May 04, 2004 at 06:00:44PM +0200, Sven Köhler wrote:
> >>well why is the shell inside my gnome-terminal killed (and restarted by
> >>gnome-terminal over and over again) if i execute halt?
> >
> >Because halt also signals all processes, independently of init. Look at
> >the top of /etc/init.d/halt.sh:
> >
> >| ebegin "Sending all processes the TERM signal"
> >| killall5 -15 &> /dev/null
> >| eend $?
> >| sleep 5
> >| ebegin "Sending all processes the KILL signal"
> >| killall5 -9 &> /dev/null
> >| eend $?
>
> OK, but that doesn't make sense to me too.
>
> I want to write a init-script to start/stop UML-machines. I wan't the
> UMLs to be gracefully shutdown. I cannot take the risk of data-loss due
> to an UML getting killed.
>
> BTW: UML=UserModeLinux
>
>
Anything in the runlevel will be gracefully shut down via the init
script's stop function (if it didn't, you'd see a whole lot of errors in
the shutdown sequence)
halt is called after everything else and kills remaining processes.
--
Jon Portnoy
avenj/irc.freenode.net
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-03 16:24 ` splite-gentoo
2004-05-04 15:13 ` [gentoo-dev] " Sven Köhler
@ 2004-05-04 15:16 ` Sven Köhler
2004-05-04 15:37 ` splite-gentoo
1 sibling, 1 reply; 22+ messages in thread
From: Sven Köhler @ 2004-05-04 15:16 UTC (permalink / raw
To: gentoo-dev
> init(8) itself sends the TERM and KILL signals when changing runlevels, and
> there's no way around that, save patching init.
redhat does it the other way round. redhat first calls all init.d
scripts and then the TERM and KILL signals are send - so did redhat
patch init?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:16 ` Sven Köhler
@ 2004-05-04 15:37 ` splite-gentoo
2004-05-04 15:59 ` Sven Köhler
0 siblings, 1 reply; 22+ messages in thread
From: splite-gentoo @ 2004-05-04 15:37 UTC (permalink / raw
To: gentoo-dev
On Tue, May 04, 2004 at 05:16:08PM +0200, Sven K?hler wrote:
> >init(8) itself sends the TERM and KILL signals when changing runlevels, and
> >there's no way around that, save patching init.
>
> redhat does it the other way round. redhat first calls all init.d
> scripts and then the TERM and KILL signals are send - so did redhat
> patch init?
I don't know; I don't use RHL or RHEL. However, I suspect they work just
as Gentoo does. init(8) first signals the processes in its process group,
so you'll see:
INIT: Switching to runlevel 0
INIT: Sending processes the TERM signal
INIT: Sending processes the KILL signal
on the console. Then init runs the RHL shutdown scripts, the final one of
which probably sends all processes SIGTERM and SIGKILL, just like Gentoo's
/etc/init.d/halt.sh does.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:37 ` splite-gentoo
@ 2004-05-04 15:59 ` Sven Köhler
2004-05-04 16:25 ` splite-gentoo
2004-05-04 16:28 ` Daniel Drake
0 siblings, 2 replies; 22+ messages in thread
From: Sven Köhler @ 2004-05-04 15:59 UTC (permalink / raw
To: gentoo-dev
> I don't know; I don't use RHL or RHEL. However, I suspect they work just
> as Gentoo does. init(8) first signals the processes in its process group,
> so you'll see:
>
> INIT: Switching to runlevel 0
> INIT: Sending processes the TERM signal
> INIT: Sending processes the KILL signal
>
> on the console. Then init runs the RHL shutdown scripts, the final one of
> which probably sends all processes SIGTERM and SIGKILL, just like Gentoo's
> /etc/init.d/halt.sh does.
No, you first see the init-scripts shutting down all the services, and
than you see the TERM/KILL stuff.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:59 ` Sven Köhler
@ 2004-05-04 16:25 ` splite-gentoo
2004-05-07 16:33 ` Chris Gianelloni
2004-05-04 16:28 ` Daniel Drake
1 sibling, 1 reply; 22+ messages in thread
From: splite-gentoo @ 2004-05-04 16:25 UTC (permalink / raw
To: gentoo-dev
On Tue, May 04, 2004 at 05:59:25PM +0200, Sven K?hler wrote:
> >I don't know; I don't use RHL or RHEL. However, I suspect they work just
> >as Gentoo does. init(8) first signals the processes in its process group,
> >so you'll see:
> >
> >INIT: Switching to runlevel 0
> >INIT: Sending processes the TERM signal
> >INIT: Sending processes the KILL signal
> >
> >on the console. Then init runs the RHL shutdown scripts, the final one of
> >which probably sends all processes SIGTERM and SIGKILL, just like Gentoo's
> >/etc/init.d/halt.sh does.
>
> No, you first see the init-scripts shutting down all the services, and
> than you see the TERM/KILL stuff.
*shrug* Maybe they kludged init so they wouldn't get support calls asking
why processes were being killed before the shutdown scripts ran.
The point is that there's nothing technically wrong with the way Gentoo
does it now.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 16:25 ` splite-gentoo
@ 2004-05-07 16:33 ` Chris Gianelloni
2004-05-07 17:53 ` splite-gentoo
0 siblings, 1 reply; 22+ messages in thread
From: Chris Gianelloni @ 2004-05-07 16:33 UTC (permalink / raw
To: splite-gentoo; +Cc: gentoo-dev
On Tue, 2004-05-04 at 12:25, splite-gentoo@sigint.cs.purdue.edu wrote:
> On Tue, May 04, 2004 at 05:59:25PM +0200, Sven K?hler wrote:
> > >I don't know; I don't use RHL or RHEL. However, I suspect they work just
> > >as Gentoo does. init(8) first signals the processes in its process group,
> > >so you'll see:
> > >
> > >INIT: Switching to runlevel 0
> > >INIT: Sending processes the TERM signal
> > >INIT: Sending processes the KILL signal
> > >
> > >on the console. Then init runs the RHL shutdown scripts, the final one of
> > >which probably sends all processes SIGTERM and SIGKILL, just like Gentoo's
> > >/etc/init.d/halt.sh does.
> >
> > No, you first see the init-scripts shutting down all the services, and
> > than you see the TERM/KILL stuff.
>
> *shrug* Maybe they kludged init so they wouldn't get support calls asking
> why processes were being killed before the shutdown scripts ran.
It is patched out. I used to do the same thing with Slackware/LFS boxes
simply because it made for fewer questions from users. You can always
grab the .src.rpm and look at what patches they use yourself.
--
Chris Gianelloni
Developer, Gentoo Linux
Games Team
Is your power animal a pengiun?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-07 16:33 ` Chris Gianelloni
@ 2004-05-07 17:53 ` splite-gentoo
0 siblings, 0 replies; 22+ messages in thread
From: splite-gentoo @ 2004-05-07 17:53 UTC (permalink / raw
To: gentoo-dev
On Fri, May 07, 2004 at 12:33:29PM -0400, Chris Gianelloni wrote:
> On Tue, 2004-05-04 at 12:25, splite-gentoo@sigint.cs.purdue.edu wrote:
> >
> > *shrug* Maybe they kludged init so they wouldn't get support calls asking
> > why processes were being killed before the shutdown scripts ran.
>
> It is patched out. I used to do the same thing with Slackware/LFS boxes
> simply because it made for fewer questions from users.
Couldn't you just have Clippy explain to them how init(8) works?
> You can always grab the .src.rpm and look at what patches they use
> yourself.
I would have, if I'd actually cared. :)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-dev] Re: strange gentoo shutdown sequence
2004-05-04 15:59 ` Sven Köhler
2004-05-04 16:25 ` splite-gentoo
@ 2004-05-04 16:28 ` Daniel Drake
1 sibling, 0 replies; 22+ messages in thread
From: Daniel Drake @ 2004-05-04 16:28 UTC (permalink / raw
To: Sven Köhler; +Cc: gentoo-dev
Sven Köhler wrote:
> No, you first see the init-scripts shutting down all the services, and
> than you see the TERM/KILL stuff.
From memory, I think gentoo does it this way:
You tell it to shut down, and you early on see:
INIT: Sending processes the ... signal
As splite pointed out, this rarely actually kills anything.
Gentoo's init scripts then kick in, closing down all running services.
You then see:
Sending all processes the TERM signal
Sending all processes the KILL signal
And this time it is really killing all remaining running processes.
And then the system shuts down.
Daniel
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-dev] strange gentoo shutdown sequence
@ 2004-05-02 11:40 Sven Köhler
0 siblings, 0 replies; 22+ messages in thread
From: Sven Köhler @ 2004-05-02 11:40 UTC (permalink / raw
To: gentoo-dev
hi,
gentoo usually does the following if i execute halt or reboot:
sending all processes the TERM signal
sending all processes the KILL signal
stopping xdm ...
stopping alsasound ...
etc....
in may eyes, this has to be the other way round:
first shutdown all deamons properly with the init.d-script, and than
send the remaining processes the TERM and KILL signals.
why does gentoo handle things the way it does? redhat etc. do it the
other way i described. using the init.d-script sounds more resonable to me.
Thx
Sven
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2004-05-07 17:53 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-02 17:32 [gentoo-dev] strange gentoo shutdown sequence William Hubbs
2004-05-03 5:10 ` John Nilsson
2004-05-03 6:15 ` Olivier Crête
2004-05-03 6:46 ` John Nilsson
2004-05-03 17:22 ` Grant Goodyear
2004-05-03 8:30 ` Paul de Vrieze
2004-05-03 8:50 ` Allen D Parker
2004-05-03 9:05 ` Paul de Vrieze
2004-05-05 18:11 ` Martin Schlemmer
2004-05-03 16:24 ` splite-gentoo
2004-05-04 15:13 ` [gentoo-dev] " Sven Köhler
2004-05-04 15:33 ` splite-gentoo
2004-05-04 16:00 ` Sven Köhler
2004-05-04 16:30 ` Jon Portnoy
2004-05-04 15:16 ` Sven Köhler
2004-05-04 15:37 ` splite-gentoo
2004-05-04 15:59 ` Sven Köhler
2004-05-04 16:25 ` splite-gentoo
2004-05-07 16:33 ` Chris Gianelloni
2004-05-07 17:53 ` splite-gentoo
2004-05-04 16:28 ` Daniel Drake
-- strict thread matches above, loose matches on Subject: below --
2004-05-02 11:40 [gentoo-dev] " Sven Köhler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox