Exemple #1
0
static void
got_signal(int sig)
{
    struct signal_info *s;
    int saved_errno = errno;

    if (sig >= NUM_SIGNALS || sig < 0) {
        /* Signal handler - we have no good way how to tell this the
         * user. She won't care anyway, tho'. */
        return;
    }

    s = &signal_info[sig];

    if (!s->handler) return;

    if (s->critical) {
        s->handler(s->data);
        errno = saved_errno;
        return;
    }

    s->mask = 1;
    check_for_select_race();

    errno = saved_errno;
}
Exemple #2
0
void got_signal( int sig )
{
  int eax;
  struct signal_info *s;
  int saved_errno = *(int*)(__errno_location(  ));
  if ( sig <= 31 && signal_info[ sig << 4 ] )
  {
    if ( s->critical )
    {
      edx( s->data[1] );
      *(int*)(__errno_location(  )) = saved_errno;
    }
    else
    {
      s->mask = 1;
      check_for_select_race(  );
      *(int*)(__errno_location(  )) = saved_errno;
    }
  }
  return;
}
Exemple #3
0
static void
alarm_handler(void *x)
{
    pending_alarm = 0;
    check_for_select_race();
}