[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interrupting Octave
From: |
Tatsuro MATSUOKA |
Subject: |
Re: Interrupting Octave |
Date: |
Wed, 12 May 2010 08:54:33 +0900 (JST) |
Hello
I have a look into the octave-3.2.4 source
Signal handling is carried out in src/signalhandler.cc
octave_interrupt_handler
octave_catch_interrupts (void)
{
octave_interrupt_handler retval;
#ifdef SIGINT
retval.int_handler = octave_set_signal_handler (SIGINT, sigint_handler);
#endif
#ifdef SIGBREAK
retval.brk_handler = octave_set_signal_handler (SIGBREAK, sigint_handler);
#endif
#ifdef USE_W32_SIGINT
// Intercept windows console control events.
// Note that the windows console signal handlers chain, so if
// install_signal_handlers is called more than once in the same program,
// then first call the following to avoid duplicates:
//
// SetConsoleCtrlHandler (w32_sigint_handler, FALSE);
if (! SetConsoleCtrlHandler (w32_sigint_handler, TRUE))
error ("SetConsoleCtrlHandler failed with %ld\n", GetLastError ());
w32_set_quiet_shutdown ();
#endif
return retval;
}
In config.h when I built octave-3.2.4, there seems to be no definition of
USE_W32_SIGINT.
However I do not know whether there is a indirect definition of USE_W32_SIGINT.
That'a all I can reply at the moment. I do have no time trace it by myself.
BTW, in the development source, the sample routine exit. However, as far as I
know, the gbulib signal
routine seemed to be used and USE_W32_SIGINT might be not effective.
Regards
Tatsuro
--- Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I have a program which shows GNU Octave command line inside a GUI and
> I would like to be able to interrupt it.
>
> 1> Under Windows, it is terribly painful to send a SIGINT, and the
> possible solutions are terrible (going from code injection to using
> external executables). Does GNU Octave respond to any other way of
> receiving a SIGINT? Like for example, receiving a custom WM_SOMETHING
> message?
>
> 2> Does GNU Octave under Windows call SetConsoleCtrlHandler to set a
> handler for Ctrl+C or does it only use the signal UNIX routine?
>
> 3> Under Mac OS X, GNU Octave starts and then creates a new terminal.
> It doesn't use the standard input/output file descriptors, if they are
> provided for it. It is possible to make it use the standard
> input/output instead of using it's own terminal window?
>
> thanks in advance,
> --
> Felipe Monteiro de Carvalho
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
--------------------------------------
2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/southafrica2010/