From: <tim...@lp...> - 2007-12-22 21:59:48
|
Dear all, I am working on finalizing wxt running as a separate process so that it can work on MacOS. I am trying to figure out what's the best way to handle interrupts from the keyboard. First, I'd like to understand how gnuplot_x11 does it, but I don't get it: gnuplot_x11 itself ignores interrupts gplt_x11.c, line4813 signal(SIGINT, SIG_IGN); gnuplot doesn't, but calls term->reset() and longjmp(). So communication with gnuplot_x11 (done with fprintf and fflush on one side, scanf on the other) can theoretically be interrupted, but in practice I just never saw any communication error. There isn't even a single check for returned values from fprintf and scanf. I have tried to hit ctrl-c while doing a long plot (something like "set samples 10000000; plot x") and never got any error. Can someone explain this to me ? Thank you very much. Best regards, Timothée Lecomte |