*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> getpgrp (2)              
Title
Content
Arch
Section
 

GETPGRP(2)

Contents


NAME    [Toc]    [Back]

     getpgrp, getpgid - get process group

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     pid_t
     getpgrp(void);

     pid_t
     getpgid(pid_t pid);

DESCRIPTION    [Toc]    [Back]

     The process group of the current process is returned by getpgrp().  The
     process group of the pid process is returned by getpgid().

     Process groups are used for distribution of signals, and 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.

     This call is thus used by programs such as csh(1) to create process
     groups in implementing job control.  The tcgetpgrp() and tcsetpgrp()
     calls are used to get/set the process group of the control terminal.

SEE ALSO    [Toc]    [Back]

      
      
     setpgid(2), termios(4)

STANDARDS    [Toc]    [Back]

     The getpgrp() function conforms to IEEE Std 1003.1-1988 (``POSIX.1'').

HISTORY    [Toc]    [Back]

     The getpgrp() function call appeared in 4.0BSD.  The getpgid() function
     call is derived from its usage in AT&T System V.4 UNIX, and first
     appeared in NetBSD 1.3.

COMPATIBILITY    [Toc]    [Back]

     This version of getpgrp() differs from past Berkeley versions by not taking
 a pid_t pid argument.  This incompatibility is required by ISO/IEC
     9945-1:1990 (``POSIX.1'').

     From the ISO/IEC 9945-1:1990 (``POSIX.1'') Rationale:

     4.3BSD provides a getpgrp() function that returns the process group ID
     for a specified process.  Although this function is used to support job
     control, all known job-control shells always specify the calling process
     with this function.  Thus, the simpler System V getpgrp() suffices, and
     the added complexity of the 4.3BSD getpgrp() has been omitted from
     POSIX.1.  The old functionality is available from the getpgid() function.

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
nsg_attach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
pgsignal FreeBSD post signal to a process or process group
gsignal FreeBSD post signal to a process or process group
psignal FreeBSD post signal to a process or process group
pfind OpenBSD find process / process group by number
pgfind OpenBSD find process / process group by number
getpgrp HP-UX get process, process group and parent process ID.
getpid HP-UX get process, process group and parent process ID.
getpgrp2 HP-UX get process, process group and parent process ID.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service