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/Pgrab_file.3proc.man.txt
+++ new/usr/src/man/man3proc/Pgrab_file.3proc.man.txt
1 1 PGRAB_FILE(3PROC) Process Control Library Functions PGRAB_FILE(3PROC)
2 2
3 3 NAME
4 4 Pgrab_file - grab and inspect an ELF object
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 struct ps_prochandle
11 13 Pgrab_file(const char *fname, int *perr);
12 14
13 15 DESCRIPTION
14 16 The Pgrab_file() function creates a handle to the ELF object contained in
15 17 file fname. This handle is considered an idle handle, it allows one to
16 18 inspect aspects of the ELF contents present in the handle, for example
17 19 obtaining CTF information and looking up symbols.
18 20
19 21 There is no running state associated with this handle nor can there be.
20 22 If one intends to control a running process or create a process, see
21 23 Pgrab(3PROC) and Pcreate(3PROC) respectively. To inspect a core file use
22 24 Pgrab_core(3PROC).
23 25
24 26 The perr argument must be a non-NULL pointer which will store a more
25 27 detailed error in the event that Pgrab_file() fails. A human-readable
26 28 form of the error can be obtained with Pgrab_error(3PROC).
27 29
28 30 When finished with the returned handle, Prelease(3PROC) must be called to
29 31 clean up resources associated with it.
30 32
31 33 RETURN VALUES
32 34 Upon successful completion, the Pgrab_file() function returns a control
33 35 handle to the process. Otherwise, NULL is returned and perr is filled in
34 36 with an error code.
35 37
36 38 ERRORS
37 39 G_ELF An unexpected libelf(3LIB) failure occurred
38 40 while processing the file named by fname.
39 41
40 42 G_FORMAT The file named by fname is not a valid ELF file.
41 43
42 44 G_NOEXEC The file named by fname does not exist.
43 45
44 46 G_STRANGE An unanticipated system error occurred while
45 47 trying to grab the file fname and create the
46 48 handle. The value of errno indicates the system
47 49 failure.
48 50
49 51 INTERFACE STABILITY
50 52 Uncommitted
51 53
52 54 MT-LEVEL
53 55 MT-Safe
54 56
55 57 SEE ALSO
56 58 errno(3C), libelf(3LIB), libproc(3LIB), Pfree(3PROC), Pgrab_core(3PROC),
57 59 Pgrab_error(3PROC), Prelease(3PROC)
58 60
59 61 illumos May 11, 2016 illumos
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX