In a freestyle job, the build phase has the following script:

#!/bin/bash
trap 'echo "Death by SIGTERM"; kill $pid; exit 15;' SIGTERM
sleep 10 & pid=$!
echo "Waiting"
wait $pid
echo "Exit status: $?"


When this is aborted with the UI [x] red box, the message "Death by 
SIGTERM" never appears, but the exit code reflects the abort by printing 
"Exit status: 143"

Why is the trap content not executed?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to