libc: remove THIRDPARTYLICENSE/extract-copyright
[unleashed.git] / share / man / man3proc / pr_getprojid.3proc
blob88426b99c411b7486a3732fd7518bb393a4e341e
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright 2015 Joyent, Inc.
13 .\"
14 .Dd May 11, 2016
15 .Dt PR_GETPROJID 3PROC
16 .Os
17 .Sh NAME
18 .Nm pr_getprojid
19 .Nd inject getprojid system call into victim process
20 .Sh SYNOPSIS
21 .Lb libproc
22 .In libproc.h
23 .Ft projid_t
24 .Fo pr_getprojid
25 .Fa "struct ps_prochandle *P"
26 .Fc
27 .Sh DESCRIPTION
28 The
29 .Fn pr_getprojid
30 function injects the
31 .Xr getprojid 2
32 system call into the target process
33 .Fa P
34 by means of the agent LWP.
35 If the process handle
36 .Fa P
38 .Dv NULL
39 then this is equivalent to calling
40 .Xr getprojid 2
41 on the currently running process.
42 .Pp
43 The
44 .Fn pr_getprojid
45 function only works on active processes.
46 Process handles that correspond to core files, zombie processes, or ELF objects
47 do not support system call injection.
48 .Sh RETURN VALUES
49 Upon successful completion, the
50 .Fn pr_getprojid
51 function's return value is that described in
52 .Xr getprojid 2 .
53 Otherwise,
54 .Sy -1
55 is returned and
56 .Sy errno
57 is set to
58 .Er ENOSYS
59 to indicate that the system call could not be injected.
60 .Sh ERRORS
61 For the full list of errors see the
62 .Sy ERRORS
63 section in
64 .Xr getprojid 2 .
65 .Pp
66 The
67 .Fn pr_getprojid
68 function will fail if:
69 .Bl -tag -width Er
70 .It Er ENOSYS
71 An error occurred while trying to invoke the agent LWP and inject a
72 system call in the process handle
73 .Fa P
74 or the process handle
75 .Fa P
76 does not support system call injection.
77 .El
78 .Sh INTERFACE STABILITY
79 .Sy Uncommitted
80 .Sh MT-LEVEL
81 See
82 .Sy LOCKING
84 .Xr libproc 3LIB .
85 .Sh SEE ALSO
86 .Xr getprojid 2 ,
87 .Xr libproc 3LIB ,
88 .Xr proc 4