File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -163,19 +163,10 @@ lint_code() {
163
163
scripts/evergreen/lint_code.sh
164
164
}
165
165
166
- # bg_job_ vars are global; capture_bg_job function is appending to them on each call
166
+ # bg_job_ vars are global; run_job_in_background function is appending to them on each call
167
167
bg_job_pids=()
168
168
bg_job_pids_with_names=()
169
169
170
- # Helper function to capture background job PID with job name
171
- capture_bg_job () {
172
- local job_name=" $1 "
173
- local job_pid=$!
174
- bg_job_pids+=(" ${job_pid} " )
175
- bg_job_pids_with_names+=(" ${job_pid} :${job_name} " )
176
- echo " Started ${job_name} with PID: ${job_pid} "
177
- }
178
-
179
170
get_job_name () {
180
171
local search_pid=" $1 "
181
172
local match
@@ -189,7 +180,11 @@ get_job_name() {
189
180
run_job_in_background () {
190
181
job_name=$1
191
182
time ${job_name} 2>&1 | prepend " ${job_name} " &
192
- capture_bg_job " ${job_name} "
183
+
184
+ local job_pid=$!
185
+ bg_job_pids+=(" ${job_pid} " )
186
+ bg_job_pids_with_names+=(" ${job_pid} :${job_name} " )
187
+ echo " Started ${job_name} with PID: ${job_pid} "
193
188
}
194
189
195
190
# Waits for all background jobs stored in bg_job_pids and check their exit codes.
You can’t perform that action at this time.
0 commit comments