1ps_pstop(3PROC)        Process Control Library Functions       ps_pstop(3PROC)
2
3
4

NAME

6       ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_lrolltoaddr, ps_kill
7       - process and LWP control in libthread_db
8

SYNOPSIS

10       #include <proc_service.h>
11
12       ps_err_e ps_pstop(struct ps_prochandle *ph);
13
14
15       ps_err_e ps_pcontinue(struct ps_prochandle *ph);
16
17
18       ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lwpid);
19
20
21       ps_err_e ps_lcontinue(struct ps_prochandle *ph,
22            lwpid_t lwpid);
23
24
25       ps_err_e ps_lrolltoaddr(struct ps_prochandle *ph,
26            lwpid_t lwpid, psaddr_t go_addr, psaddr_t stop_addr);
27
28
29       ps_err_e ps_kill(struct ps_prochandle *ph, int signum);
30
31

DESCRIPTION

33       The ps_pstop() function stops the  target  process  identified  by  ph,
34       while the ps_pcontinue() function allows it to resume.
35
36
37       The  libthread_db()  function  uses  ps_pstop()  to  freeze  the target
38       process while it is under inspection. Within the scope  of  any  single
39       call  from outside libthread_db to a libthread_db routine, libthread_db
40       will call ps_pstop(), at most once. If it does, it will  call  ps_pcon‐
41       tinue() within the scope of the same routine.
42
43
44       The  controlling  process  may  already have stopped the target process
45       when it calls libthread_db. In that case, it is not obligated to resume
46       the  target  process  when  libthread_db calls ps_pcontinue(). In other
47       words, ps_pstop() is mandatory, while ps_pcontinue() is advisory. After
48       ps_pstop(),  the  target process must be stopped; after ps_pcontinue(),
49       the target process may be running.
50
51
52       The ps_lstop() and ps_lcontinue() functions stop and  resume  a  single
53       lightweight process (LWP) within the target process ph.
54
55
56       The  ps_lrolltoaddr()  function is used to roll an LWP forward out of a
57       critical section when the process is stopped. It is also  used  to  run
58       the  libthread_db  agent  thread  on behalf of libthread. The ps_lroll‐
59       toaddr() function is always called with  the  target  process  stopped,
60       that  is,  there has been a preceding call to ps_pstop(). The specified
61       LWP must be continued at the address go_addr, or at its current address
62       if  go_addr  is  NULL.  It  should  then  be stopped when its execution
63       reaches stop_addr. This routine does  not  return  until  the  LWP  has
64       stopped at stop_addr.
65
66
67       The  ps_kill() function directs the signal signum to the target process
68       for which the handle is ph. It has the same semantics as kill(2).
69

RETURN VALUES

71       PS_OK         The  call  completed  successfully.  In   the   case   of
72                     ps_pstop(), the target process is stopped.
73
74
75       PS_BADLID     For   ps_lstop(),  ps_lcontinue()  and  ps_lrolltoaddr();
76                     there is no LWP with id lwipd in the target process.
77
78
79       PS_ERR        The function did not return successfully.
80
81

ATTRIBUTES

83       See attributes(5) for description of the following attributes:
84
85
86
87
88       ┌─────────────────────────────┬─────────────────────────────┐
89       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
90       ├─────────────────────────────┼─────────────────────────────┤
91       │MT Level                     │Safe                         │
92       └─────────────────────────────┴─────────────────────────────┘
93

SEE ALSO

95       kill(2), libc_db(3LIB), proc_service(3PROC), attributes(5), threads(5)
96
97
98
99SunOS 5.11                        22 Mar 2001                  ps_pstop(3PROC)
Impressum