[uClinux-dev] Must reinstall itself in a signal handler in uClinux 2.4??

Paul eepaul at peoplemail.com.cn
Sat Mar 29 07:50:11 EST 2003


Hi:

    I have been working on uClinux2.4 for m5272C3
    
If I don't reinstall signal handler in a signal handler itself ,the application
will be terminated as soon as I send it SIGUSR1 signal the second time.

If I write my signal handler as this :
static void sig_usr1(int signo)
{
   do_stuff();
}
The application will be terminated as soon as I send it SIGUSR1 signal the second time.


If I write my signal handler as this :
static void sig_usr1(int signo)
{
   signal(SIGUSR1,sig_usr1);
   do_stuff();
}
Everything is OK.

In Richard's APUE,it has been mentioned that we must reinstall itself in a signal hander
in early unix version such as V7. Is this also true in uClinux 2.4??


Regards
Paul


 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20030329/f7494a60/attachment.html>


More information about the uClinux-dev mailing list