select interrupted system call
<p>I am creating a timer which runs approximately every second and which is waiting for a key to be pressed (which i am not doing). While it is running it shows:</p>

<pre><code>select : interrupted system call 
select : interrupted system call 
select : interrupted system call 
select : interrupted system call 
</code></pre>

<p>Can you tell me why its this is happening: </p>

<pre><code>struct sigaction s1;
static timer_t tid3;    
sigfillset(&amp;s1.sa_mask);
s1.sa_flags = SA_SIGINFO;
s1.sa_sigaction = SignalHandler;
if (sigaction(SIGU, &amp;s1, NULL) == -1) 
{
  perror("s1 failed");
  exit( EXIT_FAILURE );
}
printf("\nTimer %d is setting up \n",TimerIdentity);    
tid3=SetTimer(SIGU, 1000, 1);

// ---------- SET timer values -------------------
static struct sigevent sigev;
static timer_t tid;
static struct itimerspec itval;
static struct itimerspec oitval;
sigev.sigev_notify = SIGEV_SIGNAL;
sigev.sigev_signo = signo;
sigev.sigev_value.sival_ptr = &amp;tid;

if (timer_create(CLOCK_REALTIME, &amp;sigev, &amp;tid) == 0) 
{
    itval.it_value.tv_sec = sec/1000;
    itval.it_value.tv_nsec = (long)(sec % 1000) * (1000000L);
    //itval.it_value.tv_nsec = 0;

    if (mode == 1) 
    {
        itval.it_interval.tv_sec = itval.it_value.tv_sec;
        itval.it_interval.tv_nsec = itval.it_value.tv_nsec;
    }
    if (timer_settime(tid, 0, &amp;itval, NULL) == 0) 
    {
        printf("Timer_settime \n");
    }
    else
    {
        perror("time_settime error!");
    }
}

//---------------- SIGNAL HANDLER ---------------- 

void SignalHandler(int signo, siginfo_t* info, void* context)
{
    else if (signo == SIGU) // for keypad being pressed
   {
      calltimer3function();
   }
</code></pre>

<p>}</p>

<pre><code>//-----------------calltimer3function------------------------  

unsigned char key5_debounce=0,key5_debounce_count=0;
calltimer3function()
{
    if(!key5_debounce)
   {
       if((GPIORead(INPUT_SW5)==0))
       {
          key5_debounce=1;
       }
   }
   if(key5_debounce)
   {
       if((GPIORead(INPUT_SW5)==0))
       {
          key5_debounce_count++;
       }
       else
       key5_debounce=0;

        if(key5_debounce_count&gt;=KEY_DEBOUNCE)
        {
           printf("key5 pressed\n");
           extr_count=1;
           printf("\nDisplay menu called");
           display_menu();

          key5_debounce=0;
          key5_debounce_count=0;
        }

   }
}
</code></pre>