PSETRUN(3PROC) Process Control Library Functions PSETRUN(3PROC) NNAAMMEE PPsseettrruunn, LLsseettrruunn - run a stopped process or thread LLIIBBRRAARRYY Process Control Library (libproc, -lproc) SSYYNNOOPPSSIISS ##iinncclluuddee <> _i_n_t PPsseettrruunn(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _i_n_t _s_i_g, _i_n_t _f_l_a_g_s); _i_n_t LLsseettrruunn(_s_t_r_u_c_t _p_s___l_w_p_h_a_n_d_l_e _*_L, _i_n_t _s_i_g, _i_n_t _f_l_a_g_s); DDEESSCCRRIIPPTTIIOONN The PPsseettrruunn() function resumes the stopped process handle _P and transitions the process to running. If _s_i_g is non-zero, then the PPsseettrruunn() function causes the signal to be delivered. See signal.h(3HEAD) for a list of valid signal identifiers. The _f_l_a_g_s member modifies the behavior of the resumed handle. The following values may be combined by a bitwise-inclusive-OR: PRCSIG Clears the current signal, if any. PRCFAULT Clears the current fault, if any. PRSTEP Indicates that the thread should single-step over the next machine instruction and upon completion, inject a trap. For the specific mechanics of single- stepping and what traps or signals will be injected, see the PPRRSSTTEEPP section of proc(4). PRSABORT Indicates that the thread should abort the system call that it is currently executing. This is only valid if the thread is stopped because it is asleep or right before a system call. This will cause the system call to return EINTR. If both PRCSIG is specified and _s_i_g is non-zero, then the PRCSIG request takes priority, and it will be treated as though _s_i_g was passed the argument 00. When the process is resumed all extent tracing flags and register changes will be synchronized with the process. For more information on resuming a thread see the PPCCRRUUNN section in proc(4). Note, the PPsseettrruunn() function is only valid for active processes. It will fail on process handles that refer to core files, zombie processes, and ELF objects. The LLsseettrruunn() function is equivalent to the PPsseettrruunn() function, except rather than operating on a process it operates on a thread. LLsseettrruunn() causes the specified thread, _L, to resume execution. Whereas PPsseettrruunn() causes all threads in the process to resume. RREETTUURRNN VVAALLUUEESS Upon successful completion, the PPsseettrruunn() and LLsseettrruunn() functions return 00. Otherwise, --11 is returned and eerrrrnnoo is set to indicate the error. EERRRROORRSS For a full list of possible errors see the DDIIAAGGNNOOSSTTIICCSS section in proc(4). The PPsseettrruunn() and LLsseettrruunn() functions will fail if: EBUSY The process handle _P is not currently stopped or it is not stopped due to an event of interest, a directed stop, or it is asleep in a system call. IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY UUnnccoommmmiitttteedd MMTT--LLEEVVEELL See LLOOCCKKIINNGG in libproc(3LIB). SSEEEE AALLSSOO signal.h(3HEAD), libproc(3LIB), Pstatus(3PROC), proc(4) illumos May 11, 2016 illumos