RE: SetConsoleCtrlHandler problem

2004-01-01 Thread Hannu E K Nevalainen
From: Michi Henning Sent: Thursday, January 01, 2004 12:07 AM 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? It's a Windows

RE: SetConsoleCtrlHandler problem

2003-12-31 Thread Hannu E K Nevalainen
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(;;)

Re: SetConsoleCtrlHandler problem

2003-12-31 Thread Michi Henning
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? It's a Windows binary that I compiled with ordinary VC++ -- that binary has nothing to

SetConsoleCtrlHandler problem

2003-12-30 Thread Michi Henning
Hi, it appears that Windows binaries won't run correctly under cygwin/bash if they use SetConsoleCtrlHandler(). I've attached a trivial program below. If you run this from a Windows console window, it prints handler called every time you hit Ctrl-C. When run from a cygwin bash window, the program

Re: SetConsoleCtrlHandler problem

2003-12-30 Thread Michi Henning
Michi Henning wrote: Shouldn't the same binary behave identically, regardless of whether I run it from cygwin/bash or a console window? Oops, forgot... Here is the version info: CYGWIN_NT-5.1 yoyo 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 unknown unknown Cygwin Cheers, Michi. -- Unsubscribe

Re: SetConsoleCtrlHandler problem

2003-12-30 Thread Michi Henning
Michi Henning wrote: Shouldn't the same binary behave identically, regardless of whether I run it from cygwin/bash or a console window? Just tried this with /bin/sh, and the problem disappears with that. Looks like the problem is with bash then? Cheers, Michi. -- Unsubscribe info: