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
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.
12 .\" Copyright 2015 Joyent, Inc.
20 .Nd obtain local descriptor table of a process
27 .Fa "struct ps_prochandle *P"
28 .Fa "struct ssd *pldt"
34 .Fa "struct ssd *pldt"
40 function reads the local descriptor table (LDT) of the process handle
56 then rather than filling in
58 only the number of entries currently in the LDT is returned.
62 should contain sufficient space for
65 For example, callers could allocate space as:
67 .Dl pldt = malloc(sizeof (struct ssd) * nldt);
69 For more information on the LDT and the
76 function is similar to the
78 function; however, rather than reading from a process handle, it reads
81 file from the /proc file system for the process
84 Upon successful completion, the
88 functions return the number of LDT entries written to
96 is zero, then no data will be written.
104 to indicate the error that occurred.
106 For a full list of possible errors see the
113 function will fail if:
116 No LDT information is available in the process handle
124 functions are only available on
127 .Sh INTERFACE STABILITY