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

  man pages->IRIX man pages -> standard/setpgrp (2)              
Title
Content
Arch
Section
 

Contents


SETPGRP(2)							    SETPGRP(2)


NAME    [Toc]    [Back]

     setpgrp, BSDsetpgrp - set process group ID	(System	V and 4.3BSD)

C SYNOPSIS    [Toc]    [Back]

   #include <unistd.h>

   SysV:
     pid_t setpgrp (void);

   BSD:
     Links with	the BSD	version	automatically:
     int BSDsetpgrp(int	pid, int pgrp);

     Links with	the BSD	version	if -lbsd is specified during link phase:
     int setpgrp(int pid, int pgrp);

DESCRIPTION    [Toc]    [Back]

     The System	V version of setpgrp behaves identically to setsid (2).

     The BSD version of	setpgrp	sets the process group of the specified
     process pid to the	specified pgrp.	 If pid	is zero, then the call applies
     to	the current process.  If pgrp is zero and pid refers to	the calling
     process, setpgrp()	behaves	identically to setsid (2).  If the invoker is
     not the super-user, then the affected process must	have the same
     effective user-id as the invoker or be a member of	the same session as
     the calling process.

ERRORS:	BSD VERSION ONLY
     BSDsetpgrp	will fail and the process group	will not be altered if one of
     the following occur:

     [ESRCH]	    The	requested process does not exist.

     [EPERM]	    The	effective user ID of the requested process is
		    different from that	of the caller and the process is not
		    in the same	session	as the calling process.

     [EACCES]	    In the Trusted IRIX	environment, the Mandatory Access
		    Control (MAC) label	of the calling process is not equal to
		    the	MAC label of pid and the calling process does not have
		    the	CAP_MAC_READ and CAP_MAC_WRITE capabilities(4).

SEE ALSO    [Toc]    [Back]

      
      
     exec(2), fork(2), getpgrp(2), getpid(2), intro(2),	kill(2), setpgid(2),
     setsid(2),	signal(2), capabilities(4), dominance(5).

DIAGNOSTICS    [Toc]    [Back]

     The System	V version of setpgrp returns the value of the new process
     group ID with no possibility of error.  The BSD version returns 0 if the
     operation is successful.  If the request fails, -1	is returned and	the
     global variable errno is set to indicate the reason.




									Page 1






SETPGRP(2)							    SETPGRP(2)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
killpg IRIX send signal to a process group (4.3BSD)
kill IRIX send signal to a process (4.3BSD)
sigblock IRIX block signals from delivery to process (4.3BSD)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_attach_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
pgsignal FreeBSD post signal to a process or process group
psignal FreeBSD post signal to a process or process group
gsignal FreeBSD post signal to a process or process group
pfind OpenBSD find process / process group by number
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service