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 |