Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <signal.h>
Link against: libc.lib

sigaction(int,const struct sigaction *,struct sigaction *)

Interface status: externallyDefinedApi

IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact);

Description

The sigaction(int,const struct sigaction *,struct sigaction *)sigaction(int,const struct sigaction *,struct sigaction *) function allows the calling process to examine and/or specify the action to be associated with a specific signal. The argument sig specifies the signal; acceptable values are defined in siganl.h.

Examples:

/* Illustrates how to use sigaction API */
# 22 "d:/EPOC/release/9.4/common/generic/openenv/core/include/signal.dosc" 2
int main()
    {
    int ret=0;
    ret = sigaction( 2 ,NULL,NULL);
    if(ret==0)
        {
        printf("sigaction() is success");
        return 0;
        }
    else
        {
        printf("sigaction() failed");
        return -1;
        }
    }
Output:
sigaction() is success

Parameters

int sig

const struct sigactionsigaction *act

struct sigactionsigaction *oact

Return value

int

Upon successful completion, sigaction(int,const struct sigaction *,struct sigaction *)sigaction(int,const struct sigaction *,struct sigaction *) shall return 0; otherwise, -1 shall be returned, errno shall be set to indicate the error, and no new signal-catching function shall be installed.

[Top]


sigemptyset(sigset_t *)

Interface status: externallyDefinedApi

IMPORT_C int sigemptyset(sigset_t *set);

Description

The sigemptyset(sigset_t *)sigemptyset(sigset_t *) function initialises the signal set pointed to by set, such that all signals defined in this document are excluded.

Examples:

/* Illustrates how to use sigemptyset API */
int main()
    {
    int ret=0;
    sigset_t sigset;
    ret=sigemptyset(&sigset);
    if(ret==0)
        {
        printf("sigemptyset success");
        return 0;
        }
    else
        {
        printf("sigemptyset failed");
        return -1;
        }
    }
Output:
sigemptyset success

Parameters

__sigset *set

Return value

int

Upon successful completion, sigemptyset(sigset_t *)sigemptyset(sigset_t *) returns 0. Otherwise, it returns -1 and sets errno to indicate the error.


signal.h Global variables