As we previously removed our exit code retrieval code to stop a
memory leak, we need a new way of doing this. Fortunately, events
is able to do the job for us.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
<Cherry-pick into 1.4.2>
Signed-off-by: Matthew Heon <matthew.heon@pm.me>