Skip to content

Commit e210d26

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "clean up logging around run_process"
2 parents 4e41fd8 + 6e137ab commit e210d26

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

functions-common

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,10 @@ function zypper_install {
11371137
# the command.
11381138
# _run_process service "command-line" [group]
11391139
function _run_process {
1140+
# disable tracing through the exec redirects, it's just confusing in the logs.
1141+
xtrace=$(set +o | grep xtrace)
1142+
set +o xtrace
1143+
11401144
local service=$1
11411145
local command="$2"
11421146
local group=$3
@@ -1160,6 +1164,9 @@ function _run_process {
11601164
export PYTHONUNBUFFERED=1
11611165
fi
11621166

1167+
# reenable xtrace before we do *real* work
1168+
$xtrace
1169+
11631170
# Run under ``setsid`` to force the process to become a session and group leader.
11641171
# The pid saved can be used with pkill -g to get the entire process group.
11651172
if [[ -n "$group" ]]; then

0 commit comments

Comments
 (0)