NO

Author Topic: SIGINT not handled on x64 at least with -Ox  (Read 2015 times)

jullien

  • Guest
SIGINT not handled on x64 at least with -Ox
« on: August 13, 2014, 09:39:11 AM »
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);
}