Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference (Volume 5 of 9): Section 2: System Calls > s

setpgrp(2)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

setpgrp — set process group ID

SYNOPSIS

#include <unistd.h>

pid_t setpgrp(void);

DESCRIPTION

If the calling process is not already a session leader, setpgrp() sets the process group ID of the calling process to the process ID of the calling process. If setpgrp() creates a new session, then the new session has no controlling terminal.

The setpgrp() function has no effect when the calling process is a session leader.

RETURN VALUE

Upon successful completion, setpgrp() returns the new process group ID.

ERRORS

If setpgrp() fails, no changes occur and errno (see errno(2)) is set to one of the following values:

[EPERM]

The calling process is already a process group leader or the process group ID of a process other than the calling process matches the process ID of the calling process.

WARNINGS

The semantics for setpgrp() changed in 10.10 (see setpgrp3(2) for compatibility to HP-UX 9.x).

STANDARDS CONFORMANCE

setpgrp(): SVID2, SVID3, XPG2, XPG3, XPG4, XPG4.2

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2000 Hewlett-Packard Development Company, L.P.