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

  man pages->HP-UX 11i man pages -> setpgrp (2)              
Title
Content
Arch
Section
 

Contents


 setpgrp(2)                                                       setpgrp(2)




 NAME    [Toc]    [Back]
      setpgrp - set process group ID

 SYNOPSIS    [Toc]    [Back]
      #include <unistd.h>

      pid_t setpgrp(void);

 DESCRIPTION    [Toc]    [Back]
      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    [Toc]    [Back]
      Upon successful completion, setpgrp() returns the new process group
      ID.

 ERRORS    [Toc]    [Back]
      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    [Toc]    [Back]
      The semantics for setpgrp() changed in 10.10 (see setpgrp3(2) for
      compatibility to HP-UX 9.x).

 SEE ALSO    [Toc]    [Back]
      exec(2), fork(2), getpid(2), getsid(2), kill(2), setsid(2),
      setpgrp3(2), <unistd.h>.

 STANDARDS CONFORMANCE    [Toc]    [Back]
      setpgrp(): SVID2, SVID3, XPG2, XPG3, XPG4, XPG4.2


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ 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