Also return undefined in on state.. The process could have exited normally.