Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpgrp2(2) — CLIX 3.1r7.6.28

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setpgrp2(2)

setpgrp(2)

getpgrp(2)

setpgid(2)



  getpgrp2(2)                         CLIX                         getpgrp2(2)



  NAME

    getpgrp2 - Gets process group

  LIBRARY

    Berkeley Software Distribution Library (libbsd.a)

  SYNOPSIS

    int getpgrp2(
      int pid );

  PARAMETERS

    pid   Specifies the process ID of the process in question.

  DESCRIPTION

    The process group of the specified process is returned by getpgrp2().  If
    pid is 0, the call applies to the current process.

    Process groups are used to distribute signals, and are used by terminals
    to arbitrate requests for their input.  Processes that have the same
    process group as the terminal are foreground and may read, while others
    will block with a signal if they attempt to read.

  EXAMPLES

    To get the process group ID of a given process:

    process_group_id = getpgrp2(pid);


  RETURN VALUES

    Upon successful completion, the process group of the specified process is
    returned.  Otherwise, a value of -1 is returned and errno is set to
    indicate the error.

  ERRORS

    The getpgrp2() function fails if the following is true:

    [ESRCH]   The requested process does not exist.

  RELATED INFORMATION

    Functions:  setpgrp2(2), setpgrp(2), getpgrp(2), setpgid(2)





  2/94 - Intergraph Corporation                                              1




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