Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Psetrun.3proc.man.txt
+++ new/usr/src/man/man3proc/Psetrun.3proc.man.txt
1 1 PSETRUN(3PROC) Process Control Library Functions PSETRUN(3PROC)
2 2
3 3 NAME
4 4 Psetrun, Lsetrun - run a stopped process or thread
5 5
6 -SYNOPSIS
6 +LIBRARY
7 7 Process Control Library (libproc, -lproc)
8 +
9 +SYNOPSIS
8 10 #include <libproc.h>
9 11
10 12 int
11 13 Psetrun(struct ps_prochandle *P, int sig, int flags);
12 14
13 15 int
14 16 Lsetrun(struct ps_lwphandle *L, int sig, int flags);
15 17
16 18 DESCRIPTION
17 19 The Psetrun() function resumes the stopped process handle P and
18 20 transitions the process to running. If sig is non-zero, then the
19 21 Psetrun() function causes the signal to be delivered. See
20 22 signal.h(3HEAD) for a list of valid signal identifiers.
21 23
22 24 The flags member modifies the behavior of the resumed handle. The
23 25 following values may be combined by a bitwise-inclusive-OR:
24 26
25 27 PRCSIG Clears the current signal, if any.
26 28
27 29 PRCFAULT Clears the current fault, if any.
28 30
29 31 PRSTEP Indicates that the thread should single-step over the
30 32 next machine instruction and upon completion, inject
31 33 a trap. For the specific mechanics of single-
32 34 stepping and what traps or signals will be injected,
33 35 see the PRSTEP section of proc(4).
34 36
35 37 PRSABORT Indicates that the thread should abort the system
36 38 call that it is currently executing. This is only
37 39 valid if the thread is stopped because it is asleep
38 40 or right before a system call. This will cause the
39 41 system call to return EINTR.
40 42
41 43 If both PRCSIG is specified and sig is non-zero, then the PRCSIG request
42 44 takes priority, and it will be treated as though sig was passed the
43 45 argument 0.
44 46
45 47 When the process is resumed all extent tracing flags and register changes
46 48 will be synchronized with the process. For more information on resuming
47 49 a thread see the PCRUN section in proc(4).
48 50
49 51 Note, the Psetrun() function is only valid for active processes. It will
50 52 fail on process handles that refer to core files, zombie processes, and
51 53 ELF objects.
52 54
53 55 The Lsetrun() function is equivalent to the Psetrun() function, except
54 56 rather than operating on a process it operates on a thread. Lsetrun()
55 57 causes the specified thread, L, to resume execution. Whereas Psetrun()
56 58 causes all threads in the process to resume.
57 59
58 60 RETURN VALUES
59 61 Upon successful completion, the Psetrun() and Lsetrun() functions return
60 62 0. Otherwise, -1 is returned and errno is set to indicate the error.
61 63
62 64 ERRORS
63 65 For a full list of possible errors see the DIAGNOSTICS section in
64 66 proc(4).
65 67
66 68 The Psetrun() and Lsetrun() functions will fail if:
67 69
68 70 EBUSY The process handle P is not currently stopped or it is
69 71 not stopped due to an event of interest, a directed
70 72 stop, or it is asleep in a system call.
71 73
72 74 INTERFACE STABILITY
73 75 Uncommitted
74 76
75 77 MT-LEVEL
76 78 See LOCKING in libproc(3LIB).
77 79
78 80 SEE ALSO
79 81 signal.h(3HEAD), libproc(3LIB), Pstatus(3PROC), proc(4)
80 82
81 83 illumos May 11, 2016 illumos
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX