diff options
author | Bart Schaefer <schaefer@ipost.com> | 2021-05-16 19:51:11 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@ipost.com> | 2021-05-16 19:51:11 -0700 |
commit | cf5c4828d1cdfd79e369a6b3323466bc961851c4 (patch) | |
tree | 5eaf375db11852b23df617ae0a64895e262ec2f2 /Src/builtin.c | |
parent | 93b4ee524df9cee5886785e9a36596af872f95f7 (diff) | |
download | zsh-cf5c4828d1cdfd79e369a6b3323466bc961851c4.tar.gz zsh-cf5c4828d1cdfd79e369a6b3323466bc961851c4.tar.xz zsh-cf5c4828d1cdfd79e369a6b3323466bc961851c4.zip |
48857: declare "volatile" all globals that may be modified by signal handlers
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index a29eb49e4..a16fddcb7 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5635,13 +5635,16 @@ bin_getopts(UNUSED(char *name), char **argv, UNUSED(Options ops), UNUSED(int fun */ /**/ -mod_export int -exit_pending; +mod_export volatile int exit_pending; /* Shell level at which we exit if exit_pending */ /**/ -mod_export int -exit_level; +mod_export volatile int exit_level; + +/* we have printed a 'you have stopped (running) jobs.' message */ + +/**/ +mod_export volatile int stopmsg; /* break, bye, continue, exit, logout, return -- most of these take * * one numeric argument, and the other (logout) is related to return. * @@ -5733,11 +5736,6 @@ bin_break(char *name, char **argv, UNUSED(Options ops), int func) return 0; } -/* we have printed a 'you have stopped (running) jobs.' message */ - -/**/ -mod_export int stopmsg; - /* check to see if user has jobs running/stopped */ /**/ |