getpgid man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

getpid(2)			 System Calls			     getpid(2)

NAME
       getpid,	getpgrp,  getppid,  getpgid  - get process, process group, and
       parent process IDs

SYNOPSIS
       #include <unistd.h>

       pid_t getpid(void);

       pid_t getpgrp(void);

       pid_t getppid(void);

       pid_t getpgid(pid_t pid);

DESCRIPTION
       The getpid() function returns the process ID of the calling process.

       The getpgrp() function returns the process  group  ID  of  the  calling
       process.

       The  getppid()  function	 returns  the parent process ID of the calling
       process.

       The getpgid() function returns the process  group  ID  of  the  process
       whose  process ID is equal to pid, or the process group ID of the call‐
       ing process, if pid is equal to 0.

RETURN VALUES
       The getpid(), getpgrp(), and getppid() functions are always  successful
       and no return value is reserved to indicate an error.

       Upon  successful	 completion,  getpgid()	 returns the process group ID.
       Otherwise, getpgid() returns (pid_t)−1 and sets errno to	 indicate  the
       error.

ERRORS
       The getpgid() function will fail if:

       EPERM	The  process  whose  process  ID is equal to pid is not in the
		same session as the calling process,  and  the	implementation
		does  not allow access to the process group ID of that process
		from the calling process.

       ESRCH	There is no process with a process ID equal to pid.

       The getpgid() function may fail if:

       EINVAL	 The value of the pid argument is invalid.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │Committed			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │MT-Level		     │Async-Signal-Safe		   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Standard		     │See standards(5).		   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       Intro(2), exec(2), fork(2),  getsid(2),	setpgid(2),  setpgrp(2),  set‐
       sid(2), signal(3C), attributes(5), standards(5)

SunOS 5.11			  27 Jan 2009			     getpid(2)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net