xref: /illumos-gate/usr/src/man/man3proc/Pstatus.3proc (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
143051d27SRobert Mustacchi.\"
243051d27SRobert Mustacchi.\" This file and its contents are supplied under the terms of the
343051d27SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0.
443051d27SRobert Mustacchi.\" You may only use this file in accordance with the terms of version
543051d27SRobert Mustacchi.\" 1.0 of the CDDL.
643051d27SRobert Mustacchi.\"
743051d27SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this
843051d27SRobert Mustacchi.\" source.  A copy of the CDDL is also available via the Internet at
943051d27SRobert Mustacchi.\" http://www.illumos.org/license/CDDL.
1043051d27SRobert Mustacchi.\"
1143051d27SRobert Mustacchi.\"
1243051d27SRobert Mustacchi.\" Copyright 2015 Joyent, Inc.
1343051d27SRobert Mustacchi.\"
1443051d27SRobert Mustacchi.Dd May 11, 2016
1543051d27SRobert Mustacchi.Dt PSTATUS 3PROC
1643051d27SRobert Mustacchi.Os
1743051d27SRobert Mustacchi.Sh NAME
1843051d27SRobert Mustacchi.Nm Pstatus
1943051d27SRobert Mustacchi.Nd obtain process status structure
20ab618543SJohn Levon.Sh LIBRARY
2143051d27SRobert Mustacchi.Lb libproc
22ab618543SJohn Levon.Sh SYNOPSIS
2343051d27SRobert Mustacchi.In libproc.h
2443051d27SRobert Mustacchi.Ft "const pstatus_t *"
2543051d27SRobert Mustacchi.Fo Pstatus
2643051d27SRobert Mustacchi.Fa "struct ps_prochandle *P"
2743051d27SRobert Mustacchi.Fc
2843051d27SRobert Mustacchi.Sh DESCRIPTION
2943051d27SRobert MustacchiThe
3043051d27SRobert Mustacchi.Fn Pstatus
3143051d27SRobert Mustacchifunction returns the status information about the process handle
3243051d27SRobert Mustacchi.Fa P .
3343051d27SRobert MustacchiThe
3443051d27SRobert Mustacchi.Sy pstatus_t
3543051d27SRobert Mustacchistructure is defined in
36*bbf21555SRichard Lowe.Xr proc 5
3743051d27SRobert Mustacchiand contains information about the process including its flags, the
3843051d27SRobert Mustacchinumber of threads, the size of the stack, and more.
3943051d27SRobert Mustacchi.Pp
4043051d27SRobert MustacchiThe returned pointer is only valid as long as the process handle
4143051d27SRobert Mustacchi.Fa P
4272d3dbb9SYuri Pankovis valid.
4372d3dbb9SYuri PankovAfter a call to
4443051d27SRobert Mustacchi.Xr Prelease 3PROC ,
4543051d27SRobert Mustacchithe returned data pointer is invalid.
4643051d27SRobert Mustacchi.Sh RETURN VALUES
4743051d27SRobert MustacchiThe
4843051d27SRobert Mustacchi.Fn Pstatus
4943051d27SRobert Mustacchifunction always returns a pointer to the process's status.
5043051d27SRobert Mustacchi.Sh INTERFACE STABILITY
5143051d27SRobert Mustacchi.Sy Uncommitted
5243051d27SRobert Mustacchi.Sh MT-LEVEL
5343051d27SRobert MustacchiSee
5443051d27SRobert Mustacchi.Sy LOCKING
5543051d27SRobert Mustacchiin
5643051d27SRobert Mustacchi.Xr libproc 3LIB .
5743051d27SRobert Mustacchi.Sh SEE ALSO
5843051d27SRobert Mustacchi.Xr libproc 3LIB ,
5943051d27SRobert Mustacchi.Xr Prelease 3PROC ,
60*bbf21555SRichard Lowe.Xr proc 5
61