setpgid man page on Ultrix

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

setpgid(3)							    setpgid(3)

Name
       setpgid - set process group (POSIX)

Syntax
       #include <sys/types.h>
       int
       setpgid(pid, pgrp)
       pid_t pid, pgrp;

Description
       The function is used to either join an existing process group or create
       a new process group within the session of the calling process (see Upon
       successful  completion,	the process group ID of the process that has a
       process ID which matches pid is set to pgrp.  If pid is zero, then  the
       call  applies to the current process. In addition, if pgrp is zero, the
       process ID of the indicated process is used.

       This function is available only in the POSIX environment.

Return Values
       The function returns 0  when  the  operation  is	 successful.   If  the
       request	fails,	-1  is	returned and the global variable indicates the
       reason.

Diagnostics
       The function fails and the process group is not altered if one  of  the
       following occurs:

       [EACCES]	      The  value of the pid argument matches the process ID of
		      a child process of the calling  process  and  the	 child
		      process has successfully executed an function.

       [EINVAL]	      The  value  of the pgrp argument is less than zero or is
		      not a supported value.

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

		      The  value of the pid argument 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.

		      The value of  the	 pgrp  argument	 does  not  match  the
		      process  ID of the process indicated by the pid argument
		      and there is no process with a  process  group  ID  that
		      matches  the value of the pgrp argument in the same ses‐
		      sion as the calling process.

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

See Also
       getpgrp(2), setsid(2)

								    setpgid(3)
[top]

List of man pages available for Ultrix

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