blob: 3cb624234656c445fa733af556dd7c27a57880b2 [file] [log] [blame]
#!/bin/bash
# If a valid failure code was provided, exit immediately.
if [ $1 != -1 ]
then
exit $1
fi
# Register a SIGTERM handler that exits with a provided exit code.
handler() {
exit $1
}
trap 'handler $2' SIGTERM
sleep 5