Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setpgrp(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                               setpgrp(2)



        _________________________________________________________________
        setpgrp                                               System Call
        Set process-group-id.
        _________________________________________________________________


        SYNTAX

        int     setpgrp (pid, pgrp)
        int     pid;
        int     pgrp;


        PARAMETERS

        Setpgrp may be invoked without arguments.


        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,
        setpgrp 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.

        If setpgrp is called without arguments, the process-group-id of
        the calling process is set to the process-id of the calling
        process.


        ACCESS CONTROL

        The access control requirements of setpgrp can be met in one of
        three ways:  1) the caller has effective-user-id of superuser, 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.

        If setpgrp is called without arguments, no access checking is
        performed.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                               setpgrp(2)



        RETURN VALUE

        When called with arguments, setpgrp returns:


        0              Successful completion.


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

        When called without arguments, setpgrp returns:


        process-group-id
                       The new value of the calling process's process-
                       group-id.


        EXCEPTIONS

        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

        The related system calls:  getpgrp.




















        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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