Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2012 00:46:18 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r231888 - head/etc
Message-ID:  <201202180046.q1I0kIaF003623@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Feb 18 00:46:18 2012
New Revision: 231888
URL: http://svn.freebsd.org/changeset/base/231888

Log:
  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

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Sat Feb 18 00:45:59 2012	(r231887)
+++ head/etc/rc.subr	Sat Feb 18 00:46:18 2012	(r231888)
@@ -985,9 +985,9 @@ run_rc_script()
 			if [ -n "$rc_fast_and_loose" ]; then
 				set $_arg; . $_file
 			else
-				( trap "echo Script $_file interrupted; kill -QUIT $$" 3
-				  trap "echo Script $_file interrupted; exit 1" 2
-				  trap "echo Script $_file running" 29
+				( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3
+				  trap "echo Script $_file interrupted >&2 ; exit 1" 2
+				  trap "echo Script $_file running >&2" 29
 				  set $_arg; . $_file )
 			fi
 		fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202180046.q1I0kIaF003623>