diff --git a/src/nano.c b/src/nano.c index 75714be9407256881a93d2d384b644ab008c1e6b..09aacfbbef78d5f9a3579e21455826696a330816 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1099,7 +1099,7 @@ bool scoop_stdin(void) struct sigaction oldaction, newaction; /* Original and temporary handlers for SIGINT. */ bool setup_failed = FALSE; - /* Whether setting up the SIGINT handler failed. */ + /* Whether setting up the temporary SIGINT handler failed. */ FILE *stream; int thetty; diff --git a/src/text.c b/src/text.c index 168d8173608382c7fbd07c813b01ab98bb3c3367..b9694f556264efc33616d387307d93b885fbdf18 100644 --- a/src/text.c +++ b/src/text.c @@ -1087,8 +1087,8 @@ bool execute_command(const char *command) const char *shellenv; struct sigaction oldaction, newaction; /* Original and temporary handlers for SIGINT. */ - bool sig_failed = FALSE; - /* Did sigaction() fail without changing the signal handlers? */ + bool setup_failed = FALSE; + /* Whether setting up the temporary SIGINT handler failed. */ /* Make our pipes. */ if (pipe(fd) == -1) { @@ -1128,12 +1128,12 @@ bool execute_command(const char *command) /* Set things up so that Ctrl-C will terminate the forked process. */ if (sigaction(SIGINT, NULL, &newaction) == -1) { - sig_failed = TRUE; + setup_failed = TRUE; nperror("sigaction"); } else { newaction.sa_handler = cancel_command; if (sigaction(SIGINT, &newaction, &oldaction) == -1) { - sig_failed = TRUE; + setup_failed = TRUE; nperror("sigaction"); } } @@ -1148,7 +1148,7 @@ bool execute_command(const char *command) nperror("wait"); /* If it was changed, restore the handler for SIGINT. */ - if (!sig_failed && sigaction(SIGINT, &oldaction, NULL) == -1) + if (!setup_failed && sigaction(SIGINT, &oldaction, NULL) == -1) nperror("sigaction"); /* Restore the terminal to its desired state, and disable