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

@@ -1,13 +1,13 @@
 '\" te
 .\" Copyright 1989 AT&T
 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
-.\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
+.\" Copyright 2018, Joyent, Inc.
 .\" 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.
 .\" 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.
 .\" 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]
-.TH PROC 4 "Jun 6, 2016"
+.TH PROC 4 "August 22, 2018"
 .SH NAME
 proc \- /proc, the process file system
 .SH DESCRIPTION
 .LP
 \fB/proc\fR is a file system that provides access to the state of each process

@@ -892,16 +892,16 @@
     int pr_wstat;            /* if zombie, the wait() status */
     int pr_argc;             /* initial argument count */
     uintptr_t pr_argv;       /* address of initial argument vector */
     uintptr_t pr_envp;       /* address of initial environment vector */
     char pr_dmodel;          /* data model of the process */
-    lwpsinfo_t pr_lwp;       /* information for representative lwp */
     taskid_t pr_taskid;      /* task id */
     projid_t pr_projid;      /* project id */
     poolid_t pr_poolid;      /* pool id */
     zoneid_t pr_zoneid;      /* zone id */
     ctid_t pr_contract;      /* process contract id */
+    lwpsinfo_t pr_lwp;       /* information for representative lwp */
 } psinfo_t;
 .fi
 .in -2
 
 .sp

@@ -1482,10 +1482,18 @@
 .SS "lwpctl"
 .LP
 Write-only control file. The messages written to this file affect the specific
 lwp rather than the representative lwp, as is the case for the process's
 \fBctl\fR file.
+.SS lwpname
+A buffer of \fBTHREAD_NAME_MAX\fR bytes representing the LWP name; the buffer is
+zero-filled if the thread name is shorter than the buffer. If no thread name is
+set, the buffer contains the empty string. A read with a buffer shorter than
+\fBTHREAD_NAME_MAX\fR bytes is not guaranteed to be NUL-terminated.  Writing to
+this file will set the LWP name for the specific lwp.  This file may not be
+present in older operating system versions. \fBTHREAD_NAME_MAX\fR may increase
+in the future; clients should be prepared for this.
 .SS "lwpstatus"
 .LP
 lwp-specific state information. This file contains the \fBlwpstatus\fR
 structure for the specific lwp as described above for the representative lwp in
 the process's \fBstatus\fR file.