Pelles C forum

Pelles C => Bug reports => Topic started by: jullien on August 13, 2014, 09:39:11 AM

Title: SIGINT not handled on x64 at least with -Ox
Post by: jullien 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);
}