SIGINT not handled on x64 at least with -Ox

Started by jullien, August 13, 2014, 09:39:11 AM

Previous topic - Next topic

jullien

Here is a small program that shows the bug.
It exits without calling handler.

#include <stdio.h>
#include <signal.h>

void
handler(int i)
{
   printf("Got signal %d\n", i);
}

int
main()
{
   signal(SIGINT, handler);
   printf("Waiting for Ctrl-C\n");
   fgetc(stdin);
}