Permalink
Browse files

Redirect all output of warn() and error() to stderr.

  • Loading branch information...
1 parent 8dd6f4f commit e14c9fdaf5021be4c0fec3aaa81e14f14dc734ac @CasperVector CasperVector committed Aug 24, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/cdm
  2. +1 −1 src/cdm-xlaunch
View
@@ -36,8 +36,8 @@ trap '' SIGINT SIGTSTP
# Helper functions.
-warn() { printf ' \033[01;33m*\033[00m '; echo "$name: $*" > /dev/stderr; }
-error() { printf ' \033[01;31m*\033[00m '; echo "$name: $*" > /dev/stderr; }
+warn() { (printf ' \033[01;33m*\033[00m '; echo "$name: $*") > /dev/stderr; }
+error() { (printf ' \033[01;31m*\033[00m '; echo "$name: $*") > /dev/stderr; }
exitnormal() { exit 0; }
exiterror() { sleep 1; exit 1; }
yesno()
View
@@ -33,7 +33,7 @@ consolekit=false
cktimeout=30
info() { printf ' \033[01;32m*\033[00m '; echo "$name: $*"; }
-error() { printf ' \033[01;31m*\033[00m '; echo "$name: $*" > /dev/stderr; }
+error() { (printf ' \033[01;31m*\033[00m '; echo "$name: $*") > /dev/stderr; }
args=$(getopt -n "$name" -o ct: -l consolekit,timeout: -- "$@") || exit 1
eval set -- "$args"

0 comments on commit e14c9fd

Please sign in to comment.