on [<modes>]exec_exit [<serial#>] [-|^]<match> { <action> }
This hook is triggered whenever an EXECed process finishes, either because it exits, it is killed by a signal, or you asked the client to disown it.
This hook is always thrown, no matter what the value of set notify_on_termination is.
$0 | process number or name of the EXECed process |
$1 | signal that killed the process, or 0 (zero) if it exited normally |
$2 | exit code (usually zero, unless $1 is non-zero) |
If you do not suppress this event, the client will format the message and display it to your screen UNLESS set notify_on_termination is OFF.
To display when a process exits:
on ^exit_exec "*" { if ( [$2] ) { xecho -b Process '$0' exited with code $2 \(signal $1\) } { xecho -b Process '$0' exited normally } }
The ON EXEC_EXIT hook first appeared in ircII. #$EPIC: on_exec_exit.txt,v 1.5 2007/03/03 17:58:33 jnelson Exp $