DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

proc(FP)


proc -- process table structure

Syntax

#include  <sys/types.h>
#include  <sys/proc.h>

short p_pgrp; /* process group */ short p_pid; /* process ID */ pid_t p_sid; /* POSIX session ID number */

Description


NOTE: The interfaces described on this manual page describe the interface used by applications written for previous releases only. New applications should use the interface described on the proc(F) manual page.

This structure contains information about a process and its state in the kernel. Even though many fields exist, only p_pgrp, p_pid, and p_sid fields can be used in a device driver. All fields in the proc structure are for reading only; do not write to any field in this structure. The process table can only be read in the task-time section of a device driver; that is, when a driver has user context.

The p_sid field is related to the p_pgrp field in its use and value. In most cases, these fields have the same value, but under special circumstances determined by a driver's implementation, they can differ.

If the p_pgrp and the p_pid fields contain the same value, then the process is the process group leader.

The u.u_procp field in the user structure contains a pointer to the proc structure.

The setpgrp(S-osr5) and setsid(S-osr5) system calls provide direct writing capability to the proc structure. These are the only means that should be used to write to this structure.

See also

setpgrp(S-osr5), setsid(S-osr5)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005