Try this method to trap exit codes...

1 job for main in 46 seconds (queued for 8 seconds)