> From: Michi Henning > Sent: Wednesday, December 31, 2003 4:39 AM > #include <Windows.h> > #include <iostream> > > static BOOL handler(DWORD sig) > { > std::cout << "handler called" << std::endl; > return 1; > } > > int main() > { > SetConsoleCtrlHandler((PHANDLER_ROUTINE)handler, true); > for(;;) > ; > return 0; > }
FWIW, my WAG, $0.02... I'd expect this to be a bit dependent on whether you use the -mno-cygwin flag or not... Or am I totally out in the blue here? (I'm curious, please elaborate if you can!) Michi, how *did you* compile it? Your code looks as it should be compiled _with_ -mno-cygwin; not much POSIX code as it seems to me. What happens if you feed this to cygwin1.dll/cygwin runtime routines -> interference? NEWBIE: Using "-mno-cygwin" -> cygwin1.dll not involved -> expect more "windows"-like or compatible handling of stuff like this. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E ** on a mailing list; please keep replies on that particular list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/