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 November 27, 2023 15.Dt LCTLFD 3PROC 16.Os 17.Sh NAME 18.Nm Lctlfd 19.Nd obtain the thread control file descriptor 20.Sh LIBRARY 21.Lb libproc 22.Sh SYNOPSIS 23.In libproc.h 24.Ft int 25.Fo Lctlfd 26.Fa "struct ps_lwphandle *L" 27.Fc 28.Sh DESCRIPTION 29The 30.Fn Lctlfd 31function returns a file descriptor to the underlying /proc file system 32.Sy ctl 33file for the thread identified by the handle 34.Fa L . 35This may be used for injecting control operations manually; however, 36many interfaces for using it are provided by 37.Xr libproc 3LIB 38itself. 39.Pp 40The file descriptor is invalidated when the thread handle is released 41through 42.Xr Lfree 3PROC . 43The caller 44.Em must not 45call 46.Xr close 2 47on the returned file descriptor. 48.Sh INTERFACE STABILITY 49.Sy Uncommitted 50.Sh MT-LEVEL 51See 52.Sy LOCKING 53in 54.Xr libproc 3LIB . 55.Sh SEE ALSO 56.Xr libproc 3LIB , 57.Xr Lfree 3PROC , 58.Xr Lgrab 3PROC , 59.Xr proc 5 60