Jump to content

Perl Programming/Keywords/getpgrp

From Wikibooks, open books for an open world
Previous: getpeername Keywords Next: getppid

The getpgrp keyword

[edit | edit source]

The getpgrp function returns the current process group of the PID. For the process group of the current process, the PID should be set to 0 or should be omitted. If Perl is implemented on a machine that does not implement getpgrp(2), an exception is raised. On POSIX systems, a PID is not accepted.

Syntax

[edit | edit source]
  getpgrp PID
  getpgrp

Examples

[edit | edit source]
   print getpgrp 0;
Previous: getpeername Keywords Next: getppid