Skip to content

Commit

Permalink
Ignore SIGCHLD in test setup script
Browse files Browse the repository at this point in the history
SIGCHLD is expected when a subprocess ends, and is not indicative of a
failure. So, when trapping on signals to detect issues, do not trap on
this signal.

This has become important with Bash 5, as it has begun propagating this
signal up to this level.

Closes #7461.
Closes #7441.
Progress on #7410 when XML splitting is disabled.

PiperOrigin-RevId: 234568715
  • Loading branch information
KeithMoyer authored and copybara-github committed Feb 19, 2019
1 parent b73de17 commit 2310b1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ if [[ "${EXPERIMENTAL_SPLIT_XML_GENERATION}" == "1" ]]; then
trap 'echo "-- Test timed out at $(date +"%F %T %Z") --"' SIGTERM
else
for signal in $signals; do
# SIGCHLD is expected when a subprocess dies
[ "${signal}" = "SIGCHLD" ] && continue
trap "write_xml_output_file ${signal}" ${signal}
done
fi
Expand Down

0 comments on commit 2310b1c

Please sign in to comment.