Commit 01d41ff4 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Fix third_party/blink/tools/debug_renderer PID finding.

Previously the shell redirection only redirected stdout, but the message was
being printed to stderr. While here, use trap to ensure that the output file
is removed even when bash exits abnormally.

Change-Id: Icf9f9de24bf115713b61e860616a6457be8fa593
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1945925
Auto-Submit: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721181}
parent c9518143
...@@ -42,8 +42,9 @@ if [ -z "$DEBUGGER" ]; then ...@@ -42,8 +42,9 @@ if [ -z "$DEBUGGER" ]; then
fi fi
OUTPUT=$(mktemp "${TMPDIR:-/tmp}"/"$(basename $0)".XXXXX) OUTPUT=$(mktemp "${TMPDIR:-/tmp}"/"$(basename $0)".XXXXX)
trap "rm $OUTPUT" EXIT
echo "$TARGET" ${TARGET_FLAGS[@]} >&2 echo "$TARGET" ${TARGET_FLAGS[@]} >&2
"$TARGET" ${TARGET_FLAGS[@]} 2>&1 > >(tee $OUTPUT) & "$TARGET" ${TARGET_FLAGS[@]} > >(tee $OUTPUT) 2>&1 &
BROWSER_PID=$! BROWSER_PID=$!
wait_renderer_pid() { wait_renderer_pid() {
...@@ -66,4 +67,3 @@ if [ -n "$RENDERER_PID" ]; then ...@@ -66,4 +67,3 @@ if [ -n "$RENDERER_PID" ]; then
fi fi
wait wait
rm $OUTPUT
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment