ALRM received command false: PROCESS_EXIT 1 JOB_EXIT 0 command true: PROCESS_EXIT 0 JOB_EXIT 0 command false | true: PROCESS_EXIT 1 PROCESS_EXIT 0 JOB_EXIT 0 This is the process whose exit event shuld be blocked This should come before the event handler PROCESS_EXIT 0 JOB_EXIT 0 Now event handler should have run PROCESS_EXIT 0