Email List: Xaustin-review-lX
[All Lists]

Bug in TC2-d2 sigaction()

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Bug in TC2-d2 sigaction()
From: yyyyyyyyy@xxxxxxx
Date: Fri, 18 Jul 2003 16:26:38 +0100 (BST)
        Bug report from : Michael Kerrisk , self

(Note that the reply-to line automatically redirects 
to yyyyyyyyyyyyyy@xxxxxxxxxxxxx for further discussion on bug reports)

@ page 1 line 41807 section sigaction() comment {example for sigaction}

Problem:

This is an EXAMPLE for the sigaction() man page.  Line number 
references are to TC1.  



Action:

Change

"None"

to the following:

The following example demonstrates the use of sigaction to 
establish a handler for the SIGINT signal.  

static void handler(int signum)
{
    /* Take appropriate actions for signal delivery */
} 

int main()
{
    struct sigaction sa;

    sa.sa_handler = handler;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = SA_RESTART;     /* Restart functions if 
                                     interrupted by handler */
    if (sigaction(SIGINT, &sa, NULL) == -1)
        /* Handle error */;

    /* Further code */
}

<Prev in Thread] Current Thread [Next in Thread>
  • Bug in TC2-d2 sigaction(), mtk-lists <=