Back to index

tetex-bin  3.0
Functions
sigaction.c File Reference

Go to the source code of this file.

Functions

static int _nc_sigaction (int sig, sigaction_t *sigact, sigaction_t *osigact)
static int _nc_sigemptyset (sigset_t *mask)
static int _nc_sigprocmask (int mode, sigset_t *mask, sigset_t *omask)
static int _nc_sigaddset (sigset_t *mask, int sig)

Function Documentation

static int _nc_sigaction ( int  sig,
sigaction_t *  sigact,
sigaction_t *  osigact 
) [static]

Definition at line 41 of file sigaction.c.

{
    return sigvec(sig, sigact, osigact);
}
static int _nc_sigaddset ( sigset_t mask,
int  sig 
) [static]

Definition at line 73 of file sigaction.c.

{
    *mask |= sigmask(sig);
    return 0;
}
static int _nc_sigemptyset ( sigset_t mask) [static]

Definition at line 47 of file sigaction.c.

{
    *mask = 0;
    return 0;
}
static int _nc_sigprocmask ( int  mode,
sigset_t mask,
sigset_t omask 
) [static]

Definition at line 54 of file sigaction.c.

{
    sigset_t current = sigsetmask(0);

    if (omask)
       *omask = current;

    if (mode == SIG_BLOCK)
       current |= *mask;
    else if (mode == SIG_UNBLOCK)
       current &= ~*mask;
    else if (mode == SIG_SETMASK)
       current = *mask;

    sigsetmask(current);
    return 0;
}