Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen" To: Subject: RE: SetConsoleCtrlHandler problem Date: Wed, 31 Dec 2003 15:37:20 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <3FF244CA.6040108@zeroc.com> X-IsSubscribed: yes > From: Michi Henning > Sent: Wednesday, December 31, 2003 4:39 AM > #include > #include > > 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/