## NAME

ACE_Sig_Action - C++ wrapper around struct sigaction.

## SYNOPSIS

    #include <ace/Signal.h>

    class ACE_Sig_Action
    {
      public:
        ACE_Sig_Action (void);
        ACE_Sig_Action (
            ACE_SignalHandler handler,
            sigset_t *sigmask = 0,
            int flags = 0
            );
        ACE_Sig_Action (
            ACE_SignalHandler handler,
            ACE_Sig_Set &sigmask,
            int flags = 0
            );
        ACE_Sig_Action (
            ACE_SignalHandler handler,
            int signum,
            sigset_t *sigmask = 0,
            int flags = 0
            );
        ACE_Sig_Action (
            ACE_SignalHandler handler,
            int signum,
            ACE_Sig_Set &sigmask,
            int flags = 0
            );
        ACE_Sig_Action (const ACE_Sig_Action &s);
        ~ACE_Sig_Action (void);
        int register_action (int signum, ACE_Sig_Action *oaction = 0);
        int restore_action (int signum, ACE_Sig_Action &oaction);
        int retrieve_action (int signum);
        void set (struct sigaction *);
        operator ACE_SIGACTION *();
        void flags (int);
        int flags (void);
        void mask (sigset_t *);
        void mask (ACE_Sig_Set &);
        sigset_t *mask (void);
        void handler (ACE_SignalHandler);
        ACE_SignalHandler handler (void);
        void sigaction (ACE_SignalHandler);
        ACE_SignalHandler sigaction (void);
        void dump (void) const;
        ACE_ALLOC_HOOK_DECLARE;
    };

## Initialization methods.

    ACE_Sig_Action (void);

    ACE_Sig_Action (
        ACE_SignalHandler handler,
        sigset_t *sigmask = 0,
        int flags = 0
        );

    ACE_Sig_Action (
        ACE_SignalHandler handler,
        ACE_Sig_Set &sigmask,
        int flags = 0
        );

    ACE_Sig_Action (
        ACE_SignalHandler handler,
        int signum,
        sigset_t *sigmask = 0,
        int flags = 0
        );

    ACE_Sig_Action (
        ACE_SignalHandler handler,
        int signum,
        ACE_Sig_Set &sigmask,
        int flags = 0
        );

    ACE_Sig_Action (const ACE_Sig_Action &s);

    ~ACE_Sig_Action (void);

Default dtor.

## Signal action management.

    int register_action (int signum, ACE_Sig_Action *oaction = 0);

Register `this` as the current disposition and store old disposition into `oaction` if it is non-NULL.

    int restore_action (int signum, ACE_Sig_Action &oaction);

Assign the value of `oaction` to `this` and make it become the new signal disposition.

    int retrieve_action (int signum);

Retrieve the current disposition into `this`.

## Set/get current signal action.

    void set (struct sigaction *);

    operator ACE_SIGACTION *();

## Set/get current signal flags.

    void flags (int);

    int flags (void);

## Set/get current signal mask.

    void mask (sigset_t *);

    void mask (ACE_Sig_Set &);

    sigset_t *mask (void);

## Set/get current signal handler (pointer to function).

    void handler (ACE_SignalHandler);

    ACE_SignalHandler handler (void);

## Set/get current sa_sigaction, which is needed for POSIX

real-time signals.

    void sigaction (ACE_SignalHandler);

    ACE_SignalHandler sigaction (void);

    void dump (void) const;

Dump the state of an object.

    ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace