Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man4/proc.4
          +++ new/usr/src/man/man4/proc.4
   1    1  '\" te
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
   4      -.\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
        4 +.\" Copyright 2018, Joyent, Inc.
   5    5  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   6    6  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   7    7  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8      -.TH PROC 4 "Jun 6, 2016"
        8 +.TH PROC 4 "August 22, 2018"
   9    9  .SH NAME
  10   10  proc \- /proc, the process file system
  11   11  .SH DESCRIPTION
  12   12  .LP
  13   13  \fB/proc\fR is a file system that provides access to the state of each process
  14   14  and light-weight process (lwp) in the system. The name of each entry in the
  15   15  \fB/proc\fR directory is a decimal number corresponding to a process-ID. These
  16   16  entries are themselves subdirectories. Access to process state is provided by
  17   17  additional files contained within each subdirectory; the hierarchy is described
  18   18  more completely below. In this document, ``\fB/proc\fR file'' refers to a
↓ open down ↓ 868 lines elided ↑ open up ↑
 887  887      timestruc_t pr_start;    /* process start time, from the epoch */
 888  888      timestruc_t pr_time;     /* cpu time for this process */
 889  889      timestruc_t pr_ctime;    /* cpu time for reaped children */
 890  890      char pr_fname[PRFNSZ];   /* name of exec'ed file */
 891  891      char pr_psargs[PRARGSZ]; /* initial characters of arg list */
 892  892      int pr_wstat;            /* if zombie, the wait() status */
 893  893      int pr_argc;             /* initial argument count */
 894  894      uintptr_t pr_argv;       /* address of initial argument vector */
 895  895      uintptr_t pr_envp;       /* address of initial environment vector */
 896  896      char pr_dmodel;          /* data model of the process */
 897      -    lwpsinfo_t pr_lwp;       /* information for representative lwp */
 898  897      taskid_t pr_taskid;      /* task id */
 899  898      projid_t pr_projid;      /* project id */
 900  899      poolid_t pr_poolid;      /* pool id */
 901  900      zoneid_t pr_zoneid;      /* zone id */
 902  901      ctid_t pr_contract;      /* process contract id */
      902 +    lwpsinfo_t pr_lwp;       /* information for representative lwp */
 903  903  } psinfo_t;
 904  904  .fi
 905  905  .in -2
 906  906  
 907  907  .sp
 908  908  .LP
 909  909  Some of the entries in \fBpsinfo\fR, such as \fBpr_addr\fR, refer to internal
 910  910  kernel data structures and should not be expected to retain their meanings
 911  911  across different versions of the operating system.
 912  912  .sp
↓ open down ↓ 564 lines elided ↑ open up ↑
1477 1477  directory of a zombie lwp.
1478 1478  .SH STRUCTURE OF \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR
1479 1479  .LP
1480 1480  A given directory \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR contains the
1481 1481  following entries:
1482 1482  .SS "lwpctl"
1483 1483  .LP
1484 1484  Write-only control file. The messages written to this file affect the specific
1485 1485  lwp rather than the representative lwp, as is the case for the process's
1486 1486  \fBctl\fR file.
     1487 +.SS lwpname
     1488 +A buffer of \fBTHREAD_NAME_MAX\fR bytes representing the LWP name; the buffer is
     1489 +zero-filled if the thread name is shorter than the buffer. If no thread name is
     1490 +set, the buffer contains the empty string. A read with a buffer shorter than
     1491 +\fBTHREAD_NAME_MAX\fR bytes is not guaranteed to be NUL-terminated.  Writing to
     1492 +this file will set the LWP name for the specific lwp.  This file may not be
     1493 +present in older operating system versions. \fBTHREAD_NAME_MAX\fR may increase
     1494 +in the future; clients should be prepared for this.
1487 1495  .SS "lwpstatus"
1488 1496  .LP
1489 1497  lwp-specific state information. This file contains the \fBlwpstatus\fR
1490 1498  structure for the specific lwp as described above for the representative lwp in
1491 1499  the process's \fBstatus\fR file.
1492 1500  .SS "lwpsinfo"
1493 1501  .LP
1494 1502  lwp-specific \fBps\fR(1) information. This file contains the \fBlwpsinfo\fR
1495 1503  structure for the specific lwp as described above for the representative lwp in
1496 1504  the process's \fBpsinfo\fR file. The \fBlwpsinfo\fR file remains accessible
↓ open down ↓ 1472 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX