1tnfctl_close(3TNF)           TNF Library Functions          tnfctl_close(3TNF)
2
3
4

NAME

6       tnfctl_close - close a tnfctl handle
7

SYNOPSIS

9       cc [ flag ... ] file ... -ltnfctl [ library ... ]
10       #include <tnf/tnfctl.h>
11       tnfctl_errcode_t tnfctl_close(tnfctl_handle_t *hndl,
12            tnfctl_targ_op_t action);
13
14

DESCRIPTION

16       tnfctl_close() is used to close a tnfctl handle and to free up the mem‐
17       ory associated with the handle.  When the handle is closed, the tracing
18       state  and the states of the probes are not changed. tnfctl_close() can
19       be used to close handles in any mode, that is, whether they  were  cre‐
20       ated      by     tnfctl_internal_open(3TNF),     tnfctl_pid_open(3TNF),
21       tnfctl_exec_open(3TNF),  tnfctl_indirect_open(3TNF),   or   tnfctl_ker‐
22       nel_open(3TNF).
23
24
25       The  action  argument is only used in direct mode, that is, if hndl was
26       created by tnfctl_exec_open(3TNF) or tnfctl_pid_open(3TNF).  In  direct
27       mode,  action specifies whether the process will proceed, be killed, or
28       remain suspended. action may have the following values:
29
30       TNFCTL_TARG_DEFAULT    Kills the target process if   hndl  was  created
31                              with  tnfctl_exec_open(3TNF),  but  lets it con‐
32                              tinue     if     it     was     created     with
33                              tnfctl_pid_open(3TNF).
34
35
36       TNFCTL_TARG_KILL       Kills the target process.
37
38
39       TNFCTL_TARG_RESUME     Allows the target process to continue.
40
41
42       TNFCTL_TARG_SUSPEND    Leaves  the  target  process suspended.  This is
43                              not a job control suspend.  It  is  possible  to
44                              attach  to  the process again with a debugger or
45                              with the tnfctl_pid_open(3TNF)  interface.   The
46                              target   process  can  also  be  continued  with
47                              prun(1).
48
49

RETURN VALUES

51       tnfctl_close() returns TNFCTL_ERR_NONE upon success.
52

ERRORS

54       The following error codes apply to tnfctl_close():
55
56       TNFCTL_ERR_BADARG      A bad argument was sent in  action.
57
58
59       TNFCTL_ERR_INTERNAL    An internal error occurred.
60
61

ATTRIBUTES

63       See attributes(5) for descriptions of the following attributes:
64
65
66
67
68       ┌─────────────────────────────┬─────────────────────────────┐
69       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
70       ├─────────────────────────────┼─────────────────────────────┤
71       │Availability                 │SUNWtnfc                     │
72       ├─────────────────────────────┼─────────────────────────────┤
73       │MT Level                     │MT-Safe                      │
74       └─────────────────────────────┴─────────────────────────────┘
75

SEE ALSO

77       prex(1),       prun(1),        TNF_PROBE(3TNF),        libtnfctl(3TNF),
78       tnfctl_exec_open(3TNF),     tnfctl_indirect_open(3TNF),     tnfctl_ker‐
79       nel_open(3TNF), tnfctl_pid_open(3TNF), tracing(3TNF), attributes(5)
80
81
82
83SunOS 5.11                        4 Mar 1997                tnfctl_close(3TNF)
Impressum