DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

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

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) and setsid(S) 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), setsid(S)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003