Put the signal trap output to standard error instead of standard output.

Without this change, pressing ^T could result in rc.d script putting
junk strings like:

	Script <filename> running

in configuration files when redirecting standard output to these files.

MFC after:	2 weeks
This commit is contained in:
Xin LI 2012-02-18 00:46:18 +00:00
parent 3494f31ad2
commit 90de8d2a65

View File

@ -985,9 +985,9 @@ run_rc_script()
if [ -n "$rc_fast_and_loose" ]; then if [ -n "$rc_fast_and_loose" ]; then
set $_arg; . $_file set $_arg; . $_file
else else
( trap "echo Script $_file interrupted; kill -QUIT $$" 3 ( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3
trap "echo Script $_file interrupted; exit 1" 2 trap "echo Script $_file interrupted >&2 ; exit 1" 2
trap "echo Script $_file running" 29 trap "echo Script $_file running >&2" 29
set $_arg; . $_file ) set $_arg; . $_file )
fi fi
fi fi