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/Pread.3proc.man.txt
+++ new/usr/src/man/man3proc/Pread.3proc.man.txt
1 1 PREAD(3PROC) Process Control Library Functions PREAD(3PROC)
2 2
3 3 NAME
4 4 Pread, Pread_string - read data from a process
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 ssize_t
11 13 Pread(struct ps_prochandle *P, void *buf, size_t nbytes,
12 14 uintptr_t address);
13 15
14 16 ssize_t
15 17 Pread_string(struct ps_prochandle *P, char *buf, size_t nbytes,
16 18 uintptr_t address);
17 19
18 20 DESCRIPTION
19 21 The Pread() function reads data from the process handle P starting at
20 22 address in the address space of the process and reads at most nbytes of
21 23 data into buf and is logically analogous to the pread(2) function.
22 24
23 25 For live processes, this function is equivalent to reading from the /proc
24 26 file system as file for the process. For core files and file handles, it
25 27 reads and writes from the logical address space and not the corresponding
26 28 offset of the file itself. For example, a core file contains a sparse
27 29 representation of the address space of a crashed process and unmapped
28 30 regions are not present in the file. However, address still refers to
29 31 the virtual addresses that were present at run-time and not those in the
30 32 core file.
31 33
32 34 The Pread_string() function is similar to the Pread() function, except
33 35 that it attempts to interpret address as a null terminated character
34 36 string and will stop reading characters into buf if either nbytes has
35 37 been read or a null terminator is encountered. The resulting data in buf
36 38 will always be null terminated, even if no null terminator was found in
37 39 the first nbytes of data.
38 40
39 41 RETURN VALUES
40 42 Upon successful completion, the Pread() and Pread_string() functions
41 43 return a non-negative integer indicating the number of bytes actually
42 44 read. Otherwise, the functions return -1 and set errno to indicate the
43 45 error.
44 46
45 47 ERRORS
46 48 For a full list of possible errors also see the DIAGNOSTICS section in
47 49 proc(4) and the ERRORS section in pread(2).
48 50
49 51 INTERFACE STABILITY
50 52 Uncommitted
51 53
52 54 MT-LEVEL
53 55 See LOCKING in libproc(3LIB).
54 56
55 57 SEE ALSO
56 58 pread(2), libproc(3LIB), proc(4)
57 59
58 60 illumos May 11, 2016 illumos
↓ open down ↓ |
41 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX