Go to main content

Oracle® Solaris 11.4 DTrace (Dynamic Tracing) Guide

Exit Print View

Updated: September 2020

Process Control APIs

struct ps_prochandle *dtrace_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv)

Creates a process under the control of DTrace. The file argument is the program to be executed. The argv argument is argv for the executed process. The process is left in a stopped state and needs to be restarted by calling dtrace_proc_continue(). See dtrace_proc_create(3DTRACE).

struct ps_prochandle *dtrace_proc_grab(dtrace_hdl_t *dtp, pid_t pid, int flags)

Places an existing process under the control of DTrace. The pid argument is the pid of the process in question. The possible values for the flag's argument are defined by libproc, which is a private API. See dtrace_proc_grab(3DTRACE).

void dtrace_proc_release(dtrace_hdl_t *dtp, struct ps_prochandle *P)

Releases a process under DTrace control. The second argument, P, is the value returned by a previous call to dtrace_proc_create() or dtrace_proc_grab(). See dtrace_proc_release(3DTRACE).

void dtrace_proc_continue(dtrace_hdl_t *dtp, struct ps_prochandle *P)

Starts a stopped process. See dtrace_proc_continue(3DTRACE).