remove hard-coded SIGTERM value and use program state to report timeouts

Resolves #1127.