[Pkg-sysvinit-devel] Bug#679630: insserv: Dependency-based boot changes SigIgn mask of daemons

Petter Reinholdtsen pere at hungry.com
Thu Apr 10 13:10:54 UTC 2014


[Michael Hanke 2012-06-30]
> Hi,

Hi again.

> In our squeeze-based cluster enabling dependency-based booting causes
> certain daemons to have different SigIgn masks -- more to the point,
> they start ignoring SIGINT. As you can imagine that has all kinds of
> implications (for the daemons and the processes they start).

Are you still able to reproduce this?  I'm trying to write a test case
to trigger this bug, but am unable to do so.  This is the test code I
use, and it always report SigIgn: 0000000000000000 for both test
scripts.  What am I doing wrong?  Note that you need startpar version
0.59 just uploaded to unstable to have support for the -e and -d options
to use startpar without running scripts in /etc/init.d/. :)

#!/bin/sh
set -e
if [ -z "$STARTPAR" ] ; then
    STARTPAR=../startpar
fi
mkdir -p etc/init.d
touch etc/insserv.conf
cat > etc/init.d/test <<'EOF'
#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides:          test
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: test script
### END INIT INFO
echo success: the test script is running $1
echo signal mask for $$:
cat /proc/$$/status | grep "\(SigIgn\|Name\)"
EOF
chmod a+rx etc/init.d/test

cat > etc/init.d/test2 <<'EOF'
#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides:          test2
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: test script
### END INIT INFO
echo success: the test2 script is running $1
echo signal mask for $$:
cat /proc/$$/status | grep "\(SigIgn\|Name\)"
EOF
chmod a+rx etc/init.d/test2

/sbin/insserv -p etc/init.d test
/sbin/insserv -p etc/init.d test2
$STARTPAR -d etc/init.d -e etc -P 1 -R 2 -M start

rm -rf etc

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-sysvinit-devel mailing list