setitimer(ITIMER_REAL,&ntimeout,NULL); /* then start timer */
/* there is a very small window between the next two lines */
/* which could result in a deadlock. But this will now be */
setitimer(ITIMER_REAL,&ntimeout,NULL); /* then start timer */
/* there is a very small window between the next two lines */
/* which could result in a deadlock. But this will now be */
ntimeout.it_interval.tv_sec = ntimeout.it_interval.tv_usec = 0;
ntimeout.it_value.tv_sec = ntimeout.it_value.tv_usec = 0;
setitimer(ITIMER_REAL,&ntimeout,NULL); /* now stop timer */
ntimeout.it_interval.tv_sec = ntimeout.it_interval.tv_usec = 0;
ntimeout.it_value.tv_sec = ntimeout.it_value.tv_usec = 0;
setitimer(ITIMER_REAL,&ntimeout,NULL); /* now stop timer */
_beginthread(itimerthread, NULL, 32768, NULL);
/* see similar code above */
if (!alarm_latch)
pause();
_beginthread(itimerthread, NULL, 32768, NULL);
/* see similar code above */
if (!alarm_latch)
pause();
- signal(SIGUSR1, SIG_IGN);
- if (!getuid())
- signal(SIGHUP, SIG_IGN);
+ set_signal_handler(SIGUSR1, SIG_IGN);
+ if (getuid() == ROOT_UID)
+ set_signal_handler(SIGHUP, SIG_IGN);