setpgid man page on NeXTSTEP

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


SETPGID(2P)							   SETPGID(2P)

NAME
       setpgid - (POSIX only) set process group

SYNOPSIS
       #include <sys/types.h>

       int setpgid(pid_t pid, gid_t pgid);

DESCRIPTION
       The   information   in	this   specification  applies  only  to	 POSIX
       applications.

       Setpgid is used to either join an existing process group	 or  create  a
       new  process  group  within  the	 session  of the calling process.  The
       process group of the specified process pid is set to pgid.  If  pid  is
       zero,  then  the call applies to the current process.  If pgid is zero,
       then the process ID of the current process is used.

       A process may change its process group, or the process group of a child
       if the child is in the same session and has not yet successfully called
       an exec() function.

RETURN VALUE
       Setpgid returns a value of 0 when the operation was successful.	If the
       request	failed, -1 is returned and the global variable errno indicates
       the reason.

ERRORS
       Setpgid will fail and the process group will not be altered if  one  of
       the following occur:

       [EACCES]	      The  value  of  pid  matches  the	 process ID of a child
		      process of the calling process, and  the	child  process
		      has successfully executed one of the exec functions.

       [EINVAL]	      The  pgid	 argument  is  less  than  zero	 or  is	 not a
		      supported value.

       [EPERM]	      The process indicated by pid is a session leader.

       [EPERM]	      The value of pid is valid, but matches the process ID of
		      a	 child	process	 of the calling process, and the child
		      process is not  in  the  same  session  as  the  calling
		      process.

       [EPERM]	      The  value  of pgid does not match the process ID of the
		      process indicated by pid, and there is no process with a
		      process  group  ID  that	matches	 the value of the pgid
		      argument in the same session as the calling process.

       [ESRCH]	      The value of pid does not match the process  ID  of  the
		      calling  process	or  of	a child process of the calling
		      process.

SEE ALSO
       execve(2), getpgrp(2), setsid(2P), tcsetpgrp(2P)

4th Berkeley Distribution	August 1, 1992			   SETPGID(2P)
[top]

List of man pages available for NeXTSTEP

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