getpgrp man page on Ultrix

Printed from http://www.polarhome.com/service/man/?qf=getpgrp&af=0&tf=2&of=Ultrix

getpgrp(2)							    getpgrp(2)

Name
       getpgrp - get process group

Syntax
       #include <sys/types.h>
       #include <unistd.h>

       pgrp = getpgrp(pid)
       pid_t pgrp;
       pid_t pid;

Description
       The system call returns the process group of the specified process.  If
       pid is zero, the call applies to the current process.

       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 the foreground and  may  read,	 while
       others block with a signal if they attempt to read.

       This  call  is  used  by	 programs  such as to create process groups in
       implementing job control.  The TIOCGPGRP and TIOCSPGRP calls  described
       in are used to get and set the process group of the control terminal.

Environment
       When  your program is compiled in the System V or POSIX environment, is
       called without arguments and the process group of the  current  process
       is returned.

       Additionally, in POSIX mode, returns a value type of pid_t.

Diagnostics
       The call fails under the following condition:

       [ESRCH]	      No such process, PID.

See Also
       getuid(2), setpgrp(2), tty(4)

								    getpgrp(2)
[top]

List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net