patch 8.2.0952: no simple way to interrupt Vim
Problem: No simple way to interrupt Vim.
Solution: Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes,
closes #1718)
diff --git a/src/globals.h b/src/globals.h
index 27a8d68..b8fd231 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1171,9 +1171,14 @@
EXTERN FILE *scriptout INIT(= NULL); // stream to write script to
EXTERN int read_cmd_fd INIT(= 0); // fd to read commands from
-// volatile because it is used in signal handler catch_sigint().
-EXTERN volatile sig_atomic_t got_int INIT(= FALSE); // set to TRUE when interrupt
- // signal occurred
+// Set to TRUE when an interrupt signal occurred.
+// Volatile because it is used in signal handler catch_sigint().
+EXTERN volatile sig_atomic_t got_int INIT(= FALSE);
+
+// Set to TRUE when SIGUSR1 signal was detected.
+// Volatile because it is used in signal handler catch_sigint().
+EXTERN volatile sig_atomic_t got_sigusr1 INIT(= FALSE);
+
#ifdef USE_TERM_CONSOLE
EXTERN int term_console INIT(= FALSE); // set to TRUE when console used
#endif