|
From: Tatsuro M. <tma...@ya...> - 2010-02-10 08:55:50
|
Hello
Sorry I have still misled.
term_reset();
(void) putc('\n', stderr);
bail_to_command_line(); /* return to prompt */
If, for example, I modify
(void) putc('\n', stderr);
char buf[256];
fgets(buf, strlen(buf), stdin);
bail_to_command_line(); /* return to prompt */
fgets(buf, strlen(buf), stdin);
is ignored. That is a problem.
I have tried term->waitforinput(), the result was the same.
Regards
Tatsuro
--- Tatsuro MATSUOKA wrote:
> 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/
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
--------------------------------------
VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/olympic/
|