clean up logging around run_process

We do a bunch of exec magic unwind in run_process that leads to a lot
of confusing lines in the logs under xtrace. Instead, disable xtrace
through these parts to ensure that the flow at the end of the day
makes more sense.

Change-Id: I91e02465240e704a1a0c0036f5073c0295be018e
This commit is contained in:
Sean Dague 2015-04-29 08:22:24 -04:00 committed by Ian Wienand
parent 43dcab990f
commit 6e137abbfe

View File

@ -1137,6 +1137,10 @@ function zypper_install {
# the command.
# _run_process service "command-line" [group]
function _run_process {
# disable tracing through the exec redirects, it's just confusing in the logs.
xtrace=$(set +o | grep xtrace)
set +o xtrace
local service=$1
local command="$2"
local group=$3
@ -1160,6 +1164,9 @@ function _run_process {
export PYTHONUNBUFFERED=1
fi
# reenable xtrace before we do *real* work
$xtrace
# Run under ``setsid`` to force the process to become a session and group leader.
# The pid saved can be used with pkill -g to get the entire process group.
if [[ -n "$group" ]]; then