Gentoo Archives: gentoo-dev

From: splite-gentoo@××××××××××××××××.edu
To: gentoo development <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] strange gentoo shutdown sequence
Date: Mon, 03 May 2004 16:24:38
Message-Id: 20040503162436.GA1938@sigint.cs.purdue.edu
In Reply to: Re: [gentoo-dev] strange gentoo shutdown sequence by William Hubbs
1 On Sun, May 02, 2004 at 12:32:23PM -0500, William Hubbs wrote:
2 > Hi all,
3 >
4 > On Sun, May 02, 2004 at 01:40:08PM +0200, Sven K?hler wrote:
5 > > hi,
6 > >
7 > > gentoo usually does the following if i execute halt or reboot:
8 > >
9 > > sending all processes the TERM signal
10 > > sending all processes the KILL signal
11 > > stopping xdm ...
12 > > stopping alsasound ...
13 > > etc....
14 > >
15 > > in may eyes, this has to be the other way round:
16 > > first shutdown all deamons properly with the init.d-script, and than
17 > > send the remaining processes the TERM and KILL signals.
18 > >
19 > >
20 > > why does gentoo handle things the way it does? redhat etc. do it the
21 > > other way i described. using the init.d-script sounds more resonable to me.
22 >
23 > 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.
24 >
25 > Is there a reason for this or should it be the other way around?
26
27 init(8) itself sends the TERM and KILL signals when changing runlevels, and
28 there's no way around that, save patching init.
29
30 It's not a real problem because init only signals processes still in init's
31 process group, and there usually aren't any. (Run "ps -eo pid,pgrp,cmd" to
32 see if any are, if you're curious.)
33
34 "man init" for more info.
35
36 --
37 gentoo-dev@g.o mailing list

Replies

Subject Author
[gentoo-dev] Re: strange gentoo shutdown sequence "Sven Köhler" <skoehler@×××.de>
[gentoo-dev] Re: strange gentoo shutdown sequence "Sven Köhler" <skoehler@×××.de>