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 29 The 30 .Fn proc_get_pstatus 31 function is a convenient way to read the /proc status file for the 32 process 33 .Fa pid . 34 The status information of the process will be filled into 35 .Fa psp . 36 The definition of the 37 .Sy pstatus_t 38 structure may be found in 39 .Xr proc 4 . 40 .Sh RETURN VALUES 41 Upon successful completion, the 42 .Fn proc_get_pstatus 43 function returns 44 .Sy 0 . 45 Otherwise, 46 .Sy -1 47 is 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