diff options
Diffstat (limited to 'Src/signals.c')
-rw-r--r-- | Src/signals.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Src/signals.c b/Src/signals.c index 4adf03202..2c540f38f 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -53,7 +53,7 @@ mod_export Eprog siglists[VSIGCOUNT]; /* Total count of trapped signals */ /**/ -mod_export int nsigtrapped; +mod_export volatile int nsigtrapped; /* Running an exit trap? */ @@ -72,20 +72,20 @@ static int exit_trap_posix; /* Variables used by signal queueing */ /**/ -mod_export int queueing_enabled, queue_front, queue_rear; +mod_export volatile int queueing_enabled, queue_front, queue_rear; /**/ mod_export int signal_queue[MAX_QUEUE_SIZE]; /**/ mod_export sigset_t signal_mask_queue[MAX_QUEUE_SIZE]; #ifdef DEBUG /**/ -mod_export int queue_in; +mod_export volatile int queue_in; #endif /* Variables used by trap queueing */ /**/ -mod_export int trap_queueing_enabled, trap_queue_front, trap_queue_rear; +mod_export volatile int trap_queueing_enabled, trap_queue_front, trap_queue_rear; /**/ mod_export int trap_queue[MAX_QUEUE_SIZE]; @@ -672,9 +672,9 @@ zhandler(int sig) if ((isset(PRIVILEGED) || isset(RESTRICTED)) && isset(INTERACTIVE) && (noerrexit & NOERREXIT_SIGNAL)) zexit(SIGINT, ZEXIT_SIGNAL); + errflag |= ERRFLAG_INT; if (list_pipe || chline || simple_pline) { breaks = loops; - errflag |= ERRFLAG_INT; inerrflush(); check_cursh_sig(SIGINT); } @@ -1266,19 +1266,19 @@ unqueue_traps(void) /* Are we already executing a trap? */ /**/ -int intrap; +volatile int intrap; /* Is the current trap a function? */ /**/ -int trapisfunc; +volatile int trapisfunc; /* * If the current trap is not a function, at what function depth * did the trap get called? */ /**/ -int traplocallevel; +volatile int traplocallevel; /* * sig is the signal number. |