User Tools

Site Tools


on_exec_exit

Synopsis:

on [<modes>]exec_exit [<serial#>] [-|^]<match> { <action> }

Description:

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.

Parameters:

$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)

Default behavior:

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.

Examples:

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
    }
 }

History:

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 $

on_exec_exit.txt · Last modified: 2007/03/03 17:58 (external edit)