Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ killpg(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                killpg(2)



        _________________________________________________________________
        killpg                                                System Call
        Send signal to a process or a process group.
        _________________________________________________________________


        SYNTAX

        None.

        int     killpg  (pgrp, signal_number)
        int     pgrp;
        int     signal_number;


        PARAMETERS

        pgrp           Process-group-id of the processes being sent the
                       signal.


        signal_number  Type of signal being sent.


        DESCRIPTION

        Killpg sends the signal <signal_number> to all processes in the
        process group identified by <pgrp>.

        The sending process must have permission to send a signal to the
        process group members.  The signal will be sent to all those
        processes for which the caller has permission.

        The process group identified by <pgrp> falls into four categories
        depending on the value of <pgrp>:

        *    pgrp > 0:
             Signal_all_processes_in_a_specified_process_group.

        <Signal_number> will be sent to all processes in the process
        group whose process-group-id is equal to <pgrp>.  System
        processes are never selected.

        *    pgrp = 0:
             Signal_all_processes_in_the_sender's_process_group.

        <Signal_number> will be sent to all processes, excluding system
        processes, whose process-group-id is equal to the process-group-
        id of the sender.  It is an error for the process-group-id of the
        sender to be zero.




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





                                                                killpg(2)



        *    pgrp == -1:  Signal_all_processes.

        If the effective-user-id of the sender is super-user,
        <signal_number> will be sent to all processes excluding system
        processes.

        Otherwise, <signal_number> will be sent to all processes,
        excluding system processes, whose process-group-id is -1 (ie. no
        processes will be sent <signal_number>.

        *    pgrp < -1:
             Signal_all_processes_in_a_specified_process_group.

        <Signal_number> will be sent to all processes, excluding system
        processes, whose process-group-id is equal to <pgrp>. [This
        selects no processes.]


        ACCESS CONTROL

        Permission to send a signal is granted in three ways:

        *    The sending and receiving processes have the same
             effective-user-id.

        *    The sending process is the super-user.

        *    The sending process is an ancestor of the receiving process
             and the signal being sent is SIGCONT.


        RETURN VALUE

        0              Completed successfully.


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


        EXCEPTIONS

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


        EINVAL         <Signal_number> is not a valid signal number.


        EINVAL         <pgrp> is zero and the caller's process-group-id
                       is zero.




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





                                                                killpg(2)



        ESRCH          No process can be found in the process group
                       identified by <pgrp>.


        EPERM          The sending process does not have permission to
                       signal all members of the specified process group.
                       This error code is not set by the Berkeley
                       implementations.


        SEE ALSO

        The related system calls:  kill, sigsys, signal.
        The related manual sections:  jobs(3), signal, csh(1), kill(1)








































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



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