delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/31/09:38:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: SetConsoleCtrlHandler problem
Date: Wed, 31 Dec 2003 15:37:20 +0100
Message-ID: <NGBBLLIAMFLGJEOAJCCEGEENDHAA.garbage_collector@telia.com>
MIME-Version: 1.0
In-Reply-To: <3FF244CA.6040108@zeroc.com>
X-IsSubscribed: yes

> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019