Pasfd, Pctlfd, Pdirfd, Lctlfd - internal /proc file descriptors
int Pasfd(ps_prochandle_t *Pr);
int Pctlfd(ps_prochandle_t *Pr);
int Pdirfd(ps_prochandle_t *Pr);
int Lctlfd(ps_lwphandle_t *Lwp);
The process control library maintains certain /proc file descriptors appropriate for the examination and control of a victim process. They are: the address space file descriptor, the process control file descriptor, the /proc/<pid> directory file descriptor for the process, and for each individually-controlled lwp in the process the lwp control file descriptor. These are normally used exclusively by the library for its own purposes. However, on the rare occasion that a controlling process needs access to low-level /proc interfaces, they may be fetched by the functions listed here.
The Pr argument identifies a victim process or core file attached to the controlling process by the create and grab interfaces. For more information, see the Pcreate(3PROC) and Pgrab(3PROC) man pages.
The Lwp argument identifies a victim lwp attached to the controlling process by the Lgrab() function. For more information, see the Lgrab(3PROC) man page.
The Pasfd() function returns the process address space file descriptor. This is always a non-negative integer.
The Pctlfd() function returns the process control file descriptor. This is a non-negative integer unless the process is grabbed with the PGRAB_RDONLY flag or the controlling process grabs a core file.
The Pdirfd() function returns the process directory file descriptor, the home /proc directory for the victim process, /proc/<pid>. This is always a non-negative integer.
The Lctlfd() function returns the lwp control file descriptor. This is a non-negative integer unless the process is grabbed with the PGRAB_RDONLY flag or the controlling process grabs a core file.
Clients must neither close these file descriptors nor use them after the process is freed.
If libproc currently has the indicated file descriptor open, the indicated file descriptor is returned. Else, -1 is returned.
There are no error returns from these functions and -1 is not an error.
See attributes(7) for descriptions of the following attributes: