Process Handler

DTrace provides the ability to insert user space probes in processes. DTrace can inform the consumer when certain events occur with respect to a process. You can install a process handler that runs when such events occur. For more information, about the APIs that provide the ability to insert user space probes in processes, see Process Control Interface in DTrace.

A process handler is invoked when a traced process terminates, or if DTrace cannot open or reopen a process (the process is untraceable), or if a shared library is loaded but an error occurred when instrumenting the library it invokes the process handler. For more information about controlling the process interface, see Using the Process Control Interface.