16096 want proc_get_lwpstatus(3PROC)
[illumos-gate.git] / usr / src / man / man3proc / proc_get_status.3proc
blobf695f799b87e526e22d36fe2eb3e1b98fc3969d0
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 November 27, 2023
15 .Dt PROC_GET_STATUS 3PROC
16 .Os
17 .Sh NAME
18 .Nm proc_get_status
19 .Nd get process status information
20 .Sh LIBRARY
21 .Lb libproc
22 .Sh SYNOPSIS
23 .In libproc.h
24 .Ft int
25 .Fo proc_get_status
26 .Fa "pid_t pid"
27 .Fa "pstatus_t *psp"
28 .Fc
29 .Sh DESCRIPTION
30 The
31 .Fn proc_get_status
32 function is a convenient way to read the /proc status file for the
33 process
34 .Fa pid .
35 The status information of the process will be filled into
36 .Fa psp .
37 The definition of the
38 .Sy pstatus_t
39 structure may be found in
40 .Xr proc 5 .
41 .Sh RETURN VALUES
42 Upon successful completion, the
43 .Fn proc_get_status
44 function returns
45 .Sy 0 .
46 Otherwise,
47 .Sy -1
48 is returned to indicate an error occurred.
49 .Sh INTERFACE STABILITY
50 .Sy Uncommitted
51 .Sh MT-LEVEL
52 .Sy MT-Safe
53 .Sh SEE ALSO
54 .Xr libproc 3LIB ,
55 .Xr proc 5