Gentoo Archives: gentoo-dev

From: Jon Portnoy <avenj@g.o>
To: "Sven Köhler" <skoehler@×××.de>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: strange gentoo shutdown sequence
Date: Tue, 04 May 2004 16:30:54
Message-Id: 20040504163047.GA19268@cerberus.oppresses.us
In Reply to: [gentoo-dev] Re: strange gentoo shutdown sequence by "Sven Köhler"
1 On Tue, May 04, 2004 at 06:00:44PM +0200, Sven Köhler wrote:
2 > >>well why is the shell inside my gnome-terminal killed (and restarted by
3 > >>gnome-terminal over and over again) if i execute halt?
4 > >
5 > >Because halt also signals all processes, independently of init. Look at
6 > >the top of /etc/init.d/halt.sh:
7 > >
8 > >| ebegin "Sending all processes the TERM signal"
9 > >| killall5 -15 &> /dev/null
10 > >| eend $?
11 > >| sleep 5
12 > >| ebegin "Sending all processes the KILL signal"
13 > >| killall5 -9 &> /dev/null
14 > >| eend $?
15 >
16 > OK, but that doesn't make sense to me too.
17 >
18 > I want to write a init-script to start/stop UML-machines. I wan't the
19 > UMLs to be gracefully shutdown. I cannot take the risk of data-loss due
20 > to an UML getting killed.
21 >
22 > BTW: UML=UserModeLinux
23 >
24 >
25
26 Anything in the runlevel will be gracefully shut down via the init
27 script's stop function (if it didn't, you'd see a whole lot of errors in
28 the shutdown sequence)
29
30 halt is called after everything else and kills remaining processes.
31
32 --
33 Jon Portnoy
34 avenj/irc.freenode.net
35
36 --
37 gentoo-dev@g.o mailing list