|
From: Tatsuro M. <tma...@ya...> - 2010-02-10 08:38:50
|
Hello
I have traced this issue.
--- Ethan Merritt wrote:
> > ****************
> > --- gnuplot-4.3.0-2009-07-08-orig/src/plot.c 2009-09-20 20:16:47 +0200
> > +++ gnuplot-4.3.0-2009-07-08/src/plot.c 2009-10-18 13:06:08 +0200
> > @@ -684,7 +684,11 @@
> > setmatherr(purec_matherr);
> > #endif
> >
> > +#if defined(WGP_CONSOLE)
> > + (void) signal(SIGINT, SIG_IGN);
> > +#else
> > (void) signal(SIGINT, (sigfunc) inter);
> > +#endif
> >
> > #ifdef SIGPIPE
> > /* ignore pipe errors, this might happen with set output "|head" */
> > ******************
I have completely misunderstood the situation. The (void) signal(SIGINT, (sigfunc) inter); works on
gnuplot.exe. Pressing CTRL+C, inter(int anint) was surely called.
In the function 'inter', the below exist
term_reset();
(void) putc('\n', stderr);
bail_to_command_line(); /* return to prompt */
#####
The upper two
term_reset();
(void) putc('\n', stderr);
was executed correctly and fails at bail_to_command_line();.
bail_to_command_line() is described as
void
bail_to_command_line()
{
#ifdef _Windows
call_kill_pending_Pause_dialog();
#endif
LONGJMP(command_line_env, TRUE);
}
call_kill_pending_Pause_dialog(); exist in commnand.c, and it just call the function
kill_pending_Pause_dialog(); in the following in winmain.c
***
void
kill_pending_Pause_dialog ()
{
if (pausewin.bPause == FALSE) /* no Pause dialog displayed */
return;
/* Pause dialog displayed, thus kill it */
DestroyWindow(pausewin.hWndPause);
#ifndef WIN32
#ifndef __DLL__
FreeProcInstance((FARPROC)pausewin.lpfnPauseButtonProc);
#endif
#endif
pausewin.bPause = FALSE;
}
Obviously, kill_pending_Pause_dialog() has no meaning for gnuplot.exe.
I have quickly tried to modify bail_to_command_line() and ,
bail_to_command_line()
{
#if defined(_Windows) && !defined(WGP_CONSOLE)
call_kill_pending_Pause_dialog();
#endif
LONGJMP(command_line_env, TRUE);
}
However, gnuplot.exe still hangs up.
LONGJMP(command_line_env, TRUE);
seems not work for windows console mode.
Perhaps, the above things have known but I have noticed this time.
Any suggestions?
Regards
Tatsuro
--------------------------------------
VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/olympic/
|