Respect requested process exit codes in onExit