Set exit status and exit description before state change.