X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=idle.c;h=04c191847870798f96634cf793f273724ce3c701;hb=87bcf29364c4640edb87cc2186b965d1a564d70c;hp=4ea21a3c4b4bfc74d712166b4fa900a2b4e3bf9c;hpb=e765df08b2c8868d4bda6ef660b209c560e4eded;p=~andy%2Ffetchmail diff --git a/idle.c b/idle.c index 4ea21a3c..04c19184 100644 --- a/idle.c +++ b/idle.c @@ -42,7 +42,7 @@ volatile int lastsig; /* last signal received */ */ static sig_atomic_t alarm_latch = FALSE; -RETSIGTYPE gotsigalrm(int sig) +void gotsigalrm(int sig) { set_signal_handler(sig, gotsigalrm); lastsig = sig; @@ -50,29 +50,11 @@ RETSIGTYPE gotsigalrm(int sig) } #endif /* SLEEP_WITH_ALARM */ -#ifdef __EMX__ -/* Various EMX-specific definitions */ -static int itimerflag; - -void itimerthread(void* dummy) -{ - if (outlevel >= O_VERBOSE) - report(stderr, - GT_("fetchmail: thread sleeping for %d sec.\n"), poll_interval); - while(1) - { - _sleep2(poll_interval*1000); - kill((getpid()), SIGALRM); - } -} -#endif - int interruptible_idle(int seconds) /* time for a pause in the action; return TRUE if awakened by signal */ { int awoken = FALSE; -#ifndef __EMX__ #ifdef SLEEP_WITH_ALARM /* not normally on */ /* * We can't use sleep(3) here because we need an alarm(3) @@ -144,15 +126,6 @@ int interruptible_idle(int seconds) } while (lastsig == SIGCHLD); } #endif -#else /* EMX */ - alarm_latch = FALSE; - set_signal_handler(SIGALRM, gotsigalrm); - _beginthread(itimerthread, NULL, 32768, NULL); - /* see similar code above */ - if (!alarm_latch) - pause(); - set_signal_handler(SIGALRM, SIG_IGN); -#endif /* ! EMX */ if (lastsig == SIGUSR1 || ((seconds && getuid() == ROOT_UID) && lastsig == SIGHUP)) awoken = TRUE;