Fix a bug with exit status

Fix a bug where a process exiting with status other than normal
(currently the only alternative can be shutdown) was returing
normal as an exit status.