This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: My program restarts six times under Cygwin when run under rxvt/xterm


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]