Preserved exit status when SIGTERM is received.

Review: https://reviews.apache.org/r/14153