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