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/Pwrite.3proc
+++ new/usr/src/man/man3proc/Pwrite.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PWRITE 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Pwrite
19 19 .Nd write data to the address space of a process
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft ssize_t
24 25 .Fo Pwrite
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "const void *buf"
27 28 .Fa "size_t nbyte"
28 29 .Fa "uintptr_t address"
29 30 .Fc
30 31 .Sh DESCRIPTION
31 32 The
32 33 .Fn Pwrite
33 34 function writes data from
34 35 .Fa buf
35 36 to the process handle
36 37 .Fa P
37 38 starting at the address
38 39 .Fa address .
39 40 It writes at most
40 41 .Fa nbyte
41 42 of data.
42 43 The
43 44 .Fn Pwrite
44 45 function is logically analogous to the
45 46 .Xr pwrite 2
46 47 function.
47 48 .Pp
48 49 For live processes, this function is equivalent to writing to the
49 50 /proc file system
50 51 .Sy as
51 52 file for the process.
52 53 For core files, it writes to the logical address space of what was once the
53 54 process and not the corresponding offset in the on-disk file.
54 55 ELF objects grabbed through
55 56 .Xr Pgrab_file 3PROC
56 57 do not support being written to.
57 58 .Pp
58 59 The
59 60 .Fn Pwrite
60 61 function cannot be used to
61 62 .Em extend
62 63 the size of a mapping; writing to an unmapped region generates an
63 64 error.
64 65 .Sh RETURN VALUES
65 66 Upon successful completion, the
66 67 .Fn Pwrite
67 68 function returns the number of bytes successfully written to
68 69 .Fa P .
69 70 This number is never greater than
70 71 .Fa nbyte .
71 72 Otherwise, it returns
72 73 .Sy -1
73 74 and
74 75 .Sy errno
75 76 is set to indicate an error.
76 77 For the full list of errors see the
77 78 .Sy DIAGNOSTICS
78 79 section in
79 80 .Xr proc 4
80 81 and
81 82 the
82 83 .Sy ERRORS
83 84 section in
84 85 .Xr pwrite 2 .
85 86 .Pp
86 87 In addition, the
87 88 .Fn Pwrite
88 89 function will fail if:
89 90 .Bl -tag -width Er
90 91 .It Er EIO
91 92 .Fa P
92 93 refers to an ELF object and not a core file or active process.
93 94 .El
94 95 .Sh INTERFACE STABILITY
95 96 .Sy Uncommitted
96 97 .Sh MT-LEVEL
97 98 See
98 99 .Sy LOCKING
99 100 in
100 101 .Xr libproc 3LIB .
101 102 .Sh SEE ALSO
102 103 .Xr pwrite 2 ,
103 104 .Xr libproc 3LIB ,
104 105 .Xr proc 4
↓ open down ↓ |
73 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX