Bug 82822 - init does not send TERM signal
Summary: init does not send TERM signal
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: SysVinit
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-27 11:12 UTC by David Balažic
Modified: 2014-03-17 02:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-01-28 06:19:56 UTC

Attachments (Terms of Use)

Description David Balažic 2003-01-27 11:12:56 UTC
Description of problem:

When going to runlevel 1 ( from level 3 ), the first thing printed is :
INIT: Switching to runlevel: 1
INIT: Sending processes the TERM signal

But in reality no such signal is sent.
I wrote a test program ( see below ) and started it in background.
Then I pressed ctrl-alt-del which caused a runlevel change to level 6 and the 
first thing printed was :
INIT: Sending processes the TERM signal

then there were the subsystem messages about stopping and then at the
end /etc/init.d/halt is executed, which really sends the TERM signal and
then reboots.

My test program printed that it received a TERM signal at the end, 
when /etc/init.d/halt was running and it did not report anything at the
beginning of runlevel change , when init wrote that message about sending the 
TERM signal.

In short :
/sbin/init prints "INIT: Sending processes the TERM signal" when 
runlevel change occurs, but it does not really send any TERM signal.
The message is bogus ( wrong ).

My test program :

trap 'echo >/dev/console "SIGNAL TERM(15) received !!!"' 15
trap 'echo >/dev/console "SIGNAL INT(2) received !!!"' 2 
trap 'echo >/dev/console "TERMtest exiting"' 0
sleep 5000

Version-Release number of selected component (if applicable):

Comment 1 Bill Nottingham 2005-01-28 06:19:56 UTC
Closing out unresolved bugs on older, end-of-lifed releases.
Apologies for any lack of response.

I believe it's misleading documentation; the processes referred to
here are the ones specifically listed in /etc/inittab.

Note You need to log in before you can comment on or make changes to this bug.