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
| ... | ... |
@@ -1137,6 +1137,10 @@ function zypper_install {
|
| 1137 | 1137 |
# the command. |
| 1138 | 1138 |
# _run_process service "command-line" [group] |
| 1139 | 1139 |
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 |
+ |
|
| 1140 | 1144 |
local service=$1 |
| 1141 | 1145 |
local command="$2" |
| 1142 | 1146 |
local group=$3 |
| ... | ... |
@@ -1160,6 +1164,9 @@ function _run_process {
|
| 1160 | 1160 |
export PYTHONUNBUFFERED=1 |
| 1161 | 1161 |
fi |
| 1162 | 1162 |
|
| 1163 |
+ # reenable xtrace before we do *real* work |
|
| 1164 |
+ $xtrace |
|
| 1165 |
+ |
|
| 1163 | 1166 |
# Run under ``setsid`` to force the process to become a session and group leader. |
| 1164 | 1167 |
# The pid saved can be used with pkill -g to get the entire process group. |
| 1165 | 1168 |
if [[ -n "$group" ]]; then |