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
26 .Fa "struct ps_prochandle *P"
27 .Fa "struct ssd *pldt"
33 .Fa "struct ssd *pldt"
39 function reads the local descriptor table (LDT) of the process handle
55 then rather than filling in
57 only the number of entries currently in the LDT is returned.
61 should contain sufficient space for
64 For example, callers could allocate space as:
66 .Dl pldt = malloc(sizeof (struct ssd) * nldt);
68 For more information on the LDT and the
75 function is similar to the
77 function; however, rather than reading from a process handle, it reads
80 file from the /proc file system for the process
83 Upon successful completion, the
87 functions return the number of LDT entries written to
95 is zero, then no data will be written.
103 to indicate the error that occurred.
105 For a full list of possible errors see the
112 function will fail if:
115 No LDT information is available in the process handle
123 functions are only available on
126 .Sh INTERFACE STABILITY