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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to