Regrading signal/sigaction.

From: siva kumar (
Date: Tue Jun 26 2001 - 17:54:15 EST


Is it possible to pass any local variable as an
argument in the signal handler function.Basically I
want to print the value of the local variable in the
signal handler function.

In the below program I want to print the value of a in
the timeout function(siganl handler), whenever the
Alaram signal send.

Your comment are welcomed.

My prototype code is:

void timeout(int signo,int a)
        printf ("timeout");
        printf("the value is %d and %d",signo,a);
        int a =5;
        struct sigaction act,oact;
        act.sa_handler = timeout;
        act.sa_flags = 0;
        sigaction(SIGALRM, &act, &oact);


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:15 EST