Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ proc(FP) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setpgrp(S)

setsid(S)


 proc(FP)                       6 January 1993                       proc(FP)


 Name

    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 ppgrp, ppid, and psid
    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 psid field is related to the ppgrp field in its use and value.  In
    most cases, these fields have the same value, but under special cir-
    cumstances determined by a driver's implementation, they can differ.

    If the ppgrp and the ppid fields contain the same value, then the pro-
    cess is the process group leader.

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

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

 See also

    setpgrp(S), setsid(S)


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026