This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: My program restarts six times under Cygwin when run under rxvt/xterm
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 16 May 2007 10:06:07 -0400
- Subject: Re: My program restarts six times under Cygwin when run under rxvt/xterm
- References: <464AAA42.1080907@ptc.com>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: cygwin-xfree at cygwin dot com
On Tue, May 15, 2007 at 11:52:50PM -0700, Alex Shturm wrote:
>Hello,
>
>This is a simple program that I compile as a console application in
>Visual Studio 2005 :
>----------------------------------------------
>#include <windows.h>
>#include <stdio.h>
>
>LONG WINAPI my_exception_filter (LPEXCEPTION_POINTERS exceptionInfo)
>{
>printf ("*** my_exception_filter ***\n");
>return EXCEPTION_EXECUTE_HANDLER;
>}
>
>
>int main(int argc, char *argv[])
>{
>printf ("\n*** SetUnhandledExceptionFilter ***\n");
>SetUnhandledExceptionFilter (my_exception_filter);
>
>
>printf ("*** RaiseException ***\n");
>RaiseException(EXCEPTION_NONCONTINUABLE_EXCEPTION ,
>EXCEPTION_NONCONTINUABLE, 0, NULL);
>}
>----------------------------------------------
Cygwin uses the equivalent of SetUnhandledExceptionFilter for its own
purposes. It can do that because there is no linux version of that
function.
So, if you attempt to use it in a cygwin-aware program, you're in for
problems. If you need to produce pure windows programs, I'd suggest
http://mingw.org/ . It doesn't seem like you need Cygwin for the
above.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/