Skip to content

Commit 7827e02

Browse files
committed
1 parent a798e37 commit 7827e02

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/instrumentation.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,20 @@ jobs:
277277
- name: "Prepare script to run."
278278
id: script
279279
env:
280-
SCRIPT: ${{ inputs.script }}
280+
SCRIPT: |
281+
# Workaround for https://github.com/ReactiveCircus/android-emulator-runner/issues/373
282+
pre_terminate_crashpad() {
283+
# For some reason pgrep/pkill sees only crashpad_handle, not crashpad_handler,
284+
# but it's definitely called ${ANDROID_HOME}/emulator/crashpad_handler.
285+
286+
# Best-effort gracefully terminate all crashpad_handler processes.
287+
pkill --exact --echo --signal SIGTERM crashpad_handle || return
288+
sleep 10
289+
pkill --exact --echo --signal SIGKILL crashpad_handle || return
290+
}
291+
trap pre_terminate_crashpad EXIT
292+
293+
${{ inputs.script }}
281294
run: |
282295
script_file="${RUNNER_TEMP}/reactivecircus-android-emulator-runner-prepared-script.sh"
283296
echo "${SCRIPT}" > "${script_file}"

0 commit comments

Comments
 (0)