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

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

Contents


 getpid(2)                                                         getpid(2)




 NAME    [Toc]    [Back]
      getpid(), getpgid(), getpgrp(), getpgrp2(), getppid() - get process,
      process group and parent process ID.

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

      pid_t getpgid (pid_t pid);

      pid_t getpgrp(void);

      pid_t getpgrp2(pid_t pid);

      pid_t getpid(void);

      pid_t getppid(void);

 DESCRIPTION    [Toc]    [Back]
      These functions return process, process group and parent process IDs,
      as follows:

           getpgid()           Process group ID of the specified process.
                               If pid is zero, the call applies to the
                               calling process.  Same result as getpgrp2().

           getpgrp()           Process group ID of the calling process.

           getpgrp2()          Process group ID of the specified process.
                               If pid is zero, the call applies to the
                               calling process.  Same result as getpgid().

           getpid()            Process ID of the calling process.

           getppid()           Parent process ID of the calling process.

 RETURN VALUE    [Toc]    [Back]
      The functions return the following values:

            n   Successful completion.  n is a nonnegative process ID, as
                described above.
           -1   Failure: getpgid() and getgrp2() only.  errno is set to
                indicate the error.

 ERRORS    [Toc]    [Back]
      If getpgid() or getpgrp2() fails, errno is set to one of the following
      values:

           [EPERM]        The current process and pid are not in the same
                          session (see setsid(2)).





 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 getpid(2)                                                         getpid(2)




           [ESRCH]        No process can be found corresponding to that
                          specified by pid.

 AUTHOR    [Toc]    [Back]
      getpid(), getppid(), getpgrp(), and getpgrp2() were developed by HP,
      AT&T, and the University of California, Berkeley.

 SEE ALSO    [Toc]    [Back]
      exec(2), fork(2), setpgid(2), setsid(2), signal(5).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      getpid(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

      getpgrp(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

      getppid(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1


 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
getpid Tru64 Get the process ID, process group ID, or parent process ID
getpgrp Tru64 Get the process ID, process group ID, or parent process ID
getppid Tru64 Get the process ID, process group ID, or parent process ID
getpid IRIX get process, process group, and parent process IDs
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)
pgfind OpenBSD find process / process group by number
psignal FreeBSD post signal to a process or process group
gsignal FreeBSD post signal to a process or process group
pgsignal FreeBSD post signal to a process or process group
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service