pget.9 (265285) | pget.9 (265930) |
---|---|
1.\" Copyright (c) 2011 Sergey Kandaurov 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" | 1.\" Copyright (c) 2011 Sergey Kandaurov 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/share/man/man9/pget.9 265285 2014-05-03 18:50:47Z pluknet $ | 25.\" $FreeBSD: stable/9/share/man/man9/pget.9 265930 2014-05-12 20:19:40Z pluknet $ |
26.\" 27.Dd May 3, 2014 28.Dt PGET 9 29.Os 30.Sh NAME 31.Nm pget 32.Nd locate a process by number 33.Sh SYNOPSIS --- 7 unchanged lines hidden (view full) --- 41.Fa pid 42as its argument, 43which can be either a process or thread id, 44and fills a pointer to the 45.Vt proc 46structure in 47.Fa *pp . 48In the latter case, a process owning the specified thread is looked for. | 26.\" 27.Dd May 3, 2014 28.Dt PGET 9 29.Os 30.Sh NAME 31.Nm pget 32.Nd locate a process by number 33.Sh SYNOPSIS --- 7 unchanged lines hidden (view full) --- 41.Fa pid 42as its argument, 43which can be either a process or thread id, 44and fills a pointer to the 45.Vt proc 46structure in 47.Fa *pp . 48In the latter case, a process owning the specified thread is looked for. |
49The actual operation is performed by invoking the | 49The operation is performed by invoking the |
50.Xr pfind 9 51function. 52The found process is returned locked. | 50.Xr pfind 9 51function. 52The found process is returned locked. |
53Only for | 53For the |
54.Dv PGET_HOLD | 54.Dv PGET_HOLD |
55case it is returned unlocked (but held). | 55case, it is returned unlocked (but held). |
56The 57.Fn pget 58function can 59perform additional manipulations, depending on a 60.Fa flags 61argument. 62.Pp 63The 64.Fa flags 65argument is the logical OR of some subset of: 66.Bl -tag -width ".Dv PGET_NOTINEXEC" 67.It Dv PGET_HOLD | 56The 57.Fn pget 58function can 59perform additional manipulations, depending on a 60.Fa flags 61argument. 62.Pp 63The 64.Fa flags 65argument is the logical OR of some subset of: 66.Bl -tag -width ".Dv PGET_NOTINEXEC" 67.It Dv PGET_HOLD |
68If set, the found process will be referenced and unlocked. | 68If set, the found process will be held and unlocked. |
69.It Dv PGET_CANSEE 70If set, the found process will be checked for its visibility. 71See 72.Xr p_cansee 9 . 73.It Dv PGET_CANDEBUG 74If set, the found process will be checked for its debuggability. 75See 76.Xr p_candebug 9 . --- 11 unchanged lines hidden (view full) --- 88.Dv P_INEXEC 89set. 90.It Dv PGET_NOTID 91If set, 92.Fa pid 93is not assumed as a thread id for values larger than 94.Dv PID_MAX . 95.It Dv PGET_WANTREAD | 69.It Dv PGET_CANSEE 70If set, the found process will be checked for its visibility. 71See 72.Xr p_cansee 9 . 73.It Dv PGET_CANDEBUG 74If set, the found process will be checked for its debuggability. 75See 76.Xr p_candebug 9 . --- 11 unchanged lines hidden (view full) --- 88.Dv P_INEXEC 89set. 90.It Dv PGET_NOTID 91If set, 92.Fa pid 93is not assumed as a thread id for values larger than 94.Dv PID_MAX . 95.It Dv PGET_WANTREAD |
96If set, the found process will be checked that the caller may get 97a read access to its structure. |
|
96A shorthand for 97.Pq Dv PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT . 98.El 99.Sh RETURN VALUES 100If the process is found in the specified way, then zero is returned, 101otherwise an appropriate error code is returned. 102.Sh SEE ALSO 103.Xr p_candebug 9 , 104.Xr p_cansee 9 , 105.Xr pfind 9 | 98A shorthand for 99.Pq Dv PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT . 100.El 101.Sh RETURN VALUES 102If the process is found in the specified way, then zero is returned, 103otherwise an appropriate error code is returned. 104.Sh SEE ALSO 105.Xr p_candebug 9 , 106.Xr p_cansee 9 , 107.Xr pfind 9 |