Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setpgrp2(2) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpgrp(2)

getpgrp2(2)

setpgrp(2)



setpgrp2(2)                       SDK R4.11                      setpgrp2(2)


NAME
       setpgrp2 - set process-group-id

SYNOPSIS
       #include <sys/types.h>

       int  setpgrp2 (pid, pgrp)
       pidt  pid;
       gidt  pgrp;

   where:
       pid       The process-id of the process whose process-group-id is to
                 be changed.  A value of zero denotes the calling process,
                 not pid 0.

       pgrp      The value to which the target process's process-group-id is
                 to be set

DESCRIPTION
       If the access control requirements described below are met, setpgrp2
       sets the process-group-id of the process specified by pid to the
       value specified by pgrp.  The value of pgrp is not required to be the
       process-id of an existing process; hence a process group with no
       group leader can be established.

ACCESS CONTROL
       The access control requirements of setpgrp2 can be met in one of
       three ways:  1) the calling process has appropriate privilege, or 2)
       the target process is a descendant of the caller in the process tree,
       or 3) the target process has the same effective-user-id as the
       caller.

       For systems supporting the DG/UX Capability Option, appropriate
       privilege is defined as having one or more specific capabilities
       enabled in the effective capability set of the calling process.  See
       capdefaults(5) for the default capability for this system call.

       On systems without the DG/UX Capability Option, appropriate privilege
       means that the process has an effective UID of root.  See the
       appropriateprivilege(5) man page for more information.

RETURN VALUE
       0      Successful completion.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       ESRCH     The process specified by pid does not exist.

       EPERM     None of the three conditions described in the ACCESS
                 CONTROL section above is met.

SEE ALSO
       getpgrp(2), getpgrp2(2), setpgrp(2), appropriateprivilege(5).
       capdefaults(5).

STANDARDS
       When using m88kbcs as the Software Development Environment target,
       the setpgrp2 function will be a restricted emulation of Berkeley
       semantics.  This emulation only allows a process to join a process
       group already in use inside its session or to create a new process
       group whose process group ID is equal to its process ID.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026