[Chapter 3] 3.2.140 setpgrp
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:53:54Z

#

| Chapter 3 Functions |

### 3.2.140 setpgrp

    setpgrp PID, PGRP

This function sets the current process group (pgrp) for the specified `PID` (use a `PID` of 0 for the current process). Invoking setpgrp will produce a fatal error if used on a machine that doesn't implement setpgrp(2). Beware: some systems will ignore the arguments you provide and always do `setpgrp(0, $$)`. Fortunately, those are the arguments one usually provides. (For better portability (by some definition), use the `setpgid()` function in the POSIX module, or if you're really just trying to daemonize your script, consider the `POSIX::setsid()` function as well.)

3.2.139 send |  | 3.2.141 setpriority