From fde7be49b92543f3039891692ea60118a64a8e79 Mon Sep 17 00:00:00 2001 From: Krzysztof Blaszkowski Date: Sun, 13 Oct 2013 22:42:41 +0200 Subject: [PATCH] ft_sigintr(), reorder, side effect: if `ft_setflag' then gr_clean() won't be invoked and can't be invoked anyway from inside of the signal handler --- src/frontend/signal_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/signal_handler.c b/src/frontend/signal_handler.c index f4e5953bd..1c02a6f05 100644 --- a/src/frontend/signal_handler.c +++ b/src/frontend/signal_handler.c @@ -51,8 +51,6 @@ ft_sigintr(void) /* Reinstall ft_signintr as the signal handler. */ (void) signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); - gr_clean(); /* Clean up plot window */ - if (ft_intrpt) { /* check to see if we're being interrupted repeatedly */ fprintf(cp_err, "\nInterrupted again (ouch)\n"); } else { @@ -64,6 +62,8 @@ ft_sigintr(void) return; /* just return without aborting simulation if ft_setflag = TRUE */ } + gr_clean(); /* Clean up plot window */ + /* sjb - what to do for editline??? The following are not supported in editline */ #if defined(HAVE_GNUREADLINE)