|
From: Benjamin L. <lin...@gm...> - 2010-01-31 19:07:09
|
Ethan Merritt wrote: > On Thursday 28 January 2010 15:33:48 Tatsuro MATSUOKA wrote: >> Hello >> >> I have remembered that Benjamin have posted concerning issue of ctrl+c on gnuplot.exe for windows. >> >> http://old.nabble.com/MSWin-issues-holding-up-4.4.rc1-td25793940.html#a26015183 >> >> **************** >> --- 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" */ >> ****************** >> >> The above seems not to be applied yet. > > That would cause the program to ignore ctrl-c. That's what the windows GUI version does... > It would be better to fix the signal-handling routine so that it > responds to ctrl-c correctly. True, but at the current stage pressing ctrl+c segfaults gnuplot and personally I'd prefer it to simply ignore it than to segfault. If you execute gnuplot as piped child process as e.g. octave does, then there is no interactive stdin so ignoring ctrl+c is a quick and simple though maybe not elegant solution of the problem. Besides the signal-handling responds correctly, but the longjmp in bail_to_command_line() fails. > Does someone know the history of this problem? > Did ctrl-c work on Windows in older versions of gnuplot? With older versions you mean the gui version? These ignored ctrl+c to my knowledge. benjamin |