Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigset(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                sigset(2)



        _________________________________________________________________
        sigset                                                System Call
        Specify what to do upon presentation of a signal.
        _________________________________________________________________


        SYNTAX

        #include <signal.h>

        void    (* sigset (signal_number, action))()
        int     signal_number;
        void    (*action)();


        PARAMETERS

        signal_number  Type of signal.


        action         Handler for the signal.


        DESCRIPTION

        Signal allows the calling process to choose one of four ways to
        handle the presentation of a specific signal.  <Signal_number>
        specifies the signal and <action> specifies the choice.

        <Signal_number> may be any of the valid signals except SIGKILL.
        See signal.h for a complete list.

        <Action> is assigned one of four values: SIG_DFL, SIG_IGN,
        SIG_HOLD, or a function address.  The actions prescribed by these
        values are as follows.

        SIGDFL - Process termination.

        The process's signal action vector entry for <signal_number> is
        set to `default' and the blocked signal vector entry for
        <signal_number> is cleared.

        When the signal <signal_number> is sent to the process, it will
        not be pended and will cause the process to either terminate,
        stop, ignore the signal, or terminate with a core dump depending
        on the signal's type (see signal.h).

        If a core dump is indicated, the receiving process must have
        adequate permission to do so.

        SIGIGN - Ignore signal.



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





                                                                sigset(2)



        The process's signal action vector entry for <signal_number> is
        set to `ignore' and the blocked signal vector entry for
        <signal_number> is cleared.

        When the signal <signal_number> is sent to the process, it will
        not be pended and will be discarded.

        SIGKILL, SIGCONT and SIGSTOP cannot be ignored.

        SIGHOLD - Hold signal.

        The process's signal action vector entry for <signal_number> is
        not modified, but the block signal vector entry for
        <signal_number> is set.  This option is equivalent to the system
        call 'sighold'.

        Function_address - Catch signal.

        The process's signal action vector entry for <signal_number> is
        set to `catch' and the blocked signal vector entry for
        <signal_number> is cleared.  If the signal <signal_number> was
        pended, the signal is presented to the process.

        When the signal <signal_number> is sent to the process, it will
        not be pended and will cause signal handler specified by <action>
        to be invoked.

        The following attributes are set for the signal action vector
        entry for <signal_number>:

        *    The signal mask addend is set to the specified signal.
             Thus, the specified signal will be added to the set of
             blocked signals when the signal handler is invoked.

        *    The signal stack choice specifies the current execution
             stack.  Thus, no stack change is made.

        *    The new signal action is set to `default' unless the
             signal's new signal action is always `unchanged'.  For
             signals whose new signal action is set to `default', the
             occurrence of multiple signals may cause some signals to be
             lost or may cause the process to terminate.

        *    The restart system call choice specifies that system calls
             interrupted by signal <signal_number> should not be
             restarted.

        SIGKILL cannot be caught.

        After a fork, the child process inherits all software signal
        structures, except that the pending signal vector is cleared.



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





                                                                sigset(2)



        Exec modifies the software signal structures in the following
        manner:  1) The signal action for signals set to `catch' is
        changed to `default'.  2) The signal stack context is discarded.
        3) All other software signal structures are unchanged.

        Setting the signal SIGCLD to SIG_IGN affects exit and wait in the
        following manner:  1) The calling process's child processes will
        be cleaned-up by the system when they terminate.  2) If the
        calling process later performs a wait operation, wait will
        suspend the calling process until all child processes have
        terminated and will return with the error condition ECHILD.

        Signal will fail and the signal handler will be unchanged if an
        error occurs.


        ACCESS CONTROL

        No access is required to install a signal handler.

        The receiving process is granted permission to produce a core
        dump file provided

        *    the effective-user-id and the real-user-id of the receiving
             process are equal, and

        *    the receiving process has adequate file system permission to
             create or rewrite the core dump file.


        RETURN VALUE

        <old_action>   Completed successfully. The previous signal
                       handler for <signal_number> is returned.


        SIG_ERR        An error occurred.  Errno is set to indicate the
                       error.


        EXCEPTIONS

        Errno may be set to the following error code:


        EINVAL         <Signal_number> is an illegal signal number,
                       including SIGKILL.


        SEE ALSO




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





                                                                sigset(2)



        The related system calls:  kill, pause, ptrace, wait.
        The related manual sections:  setjmp(3C), kill(1) in the User's
        Reference for the DG/UX System.



















































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



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