octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MSVC patch: SIGINT catching


From: John W. Eaton
Subject: Re: MSVC patch: SIGINT catching
Date: Fri, 3 Nov 2006 13:17:19 -0500

On  2-Nov-2006, Michael Goffioul wrote:

| John W. Eaton a écrit :
| > On  2-Nov-2006, address@hidden wrote:
| >
| > | Here's a patch that enables CTRL-C handling under MSVC, using the code
| > | for MinGW.
| >
| > I applied this patch.  Now the init funtions for MinGW and MSVC are
| > the same, so maybe the common init code should go in a single
| > function?
| >
| > Also, MinGW has
| >
| >   void
| >   MINGW_signal_cleanup (void)
| >   {
| >     w32_set_quiet_shutdown ();
| >
| >     w32_raise_final ();
| >   }
| >
| > which is called in a few places in src/sighandlers.cc using the
| > MINGW_SIGNAL_CLEANUP macro that is conditionally defined based on
| >
| >   #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
| >
| > in sysdep.h.  So I suppose this is already being used.  For clarity,
| > it would maybe be better if these common functions had w32/W32 names
| > instead of MINGW/MSVC names.
| >   
| 
| Indeed. Do you want me to provide a patch?

Yes, please do.

| Note that after testing the CTRL-C handling code, I cannot say it works 
| well. It sometimes
| produces a crash. Indeed, the method (changing the eip) looks quite rude...

Where does the crash happen (though with signals, this might not tell
you much)?

It would be great to have a better way of handling this, but I have no
clue how to do it.  I think David Bateman wrote this code based
something from MinGW.  What do other programs that need to handle
interrupts do on Windows systems?

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]