Opened 13 years ago
Closed 12 years ago
#10119 closed defect (worksforme)
Semaphore, SIGALRM not fired
Reported by: | Adam | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.1.8 |
Keywords: | signal, alarm, semaphore | Cc: | |
Guest type: | Linux | Host type: | Windows |
Description (last modified by )
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); }
Change History (4)
comment:1 by , 13 years ago
comment:4 by , 12 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
No response, closing.
Note:
See TracTickets
for help on using tickets.
Works fine here (Linux host, Debian Squeeze guest). Which guest did you use for this test?