﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
10119,"Semaphore, SIGALRM not fired",Adam,,"There's a bug in handling SIGALRM while waiting for a samaphore - signal is never delivered.

{{{
#include <stdio.h>
#include <stdlib.h>
#include <semaphore.h>
#include <signal.h>

static void handler(int sig) { exit(0); }

main() {
   sem_t s;
   struct sigaction sa;

   sem_init(&s, 0, 0);
   sa.sa_handler = handler;
   sigemptyset(&sa.sa_mask);
   sa.sa_flags = 0;
   if (sigaction(SIGALRM, &sa, NULL) == -1) exit(-1);
   alarm(2);
   sem_wait(&s);
}
}}}




 ",defect,closed,other,VirtualBox 4.1.8,worksforme,"signal, alarm, semaphore",,Linux,Windows
