Bug 82822

Summary: init does not send TERM signal
Product: [Retired] Red Hat Linux Reporter: David Balažic <david.balazic>
Component: SysVinitAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mitr, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-28 06:19:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 :

#!/bin/bash
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):
SysVinit-2.84-7

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.