diff options
author | Daniel Shahaf <danielsh@apache.org> | 2019-12-17 07:44:28 +0000 |
---|---|---|
committer | Daniel Shahaf <danielsh@apache.org> | 2019-12-18 06:01:50 +0000 |
commit | ae7e291873c1f80c51f53db934a87df2c0eaf821 (patch) | |
tree | df45bb0d415d9ea055554a1301776efc039d81c8 | |
parent | a370f24137049d0c6b88f53e8846483949fc9d95 (diff) | |
download | zsh-ae7e291873c1f80c51f53db934a87df2c0eaf821.tar.gz zsh-ae7e291873c1f80c51f53db934a87df2c0eaf821.tar.xz zsh-ae7e291873c1f80c51f53db934a87df2c0eaf821.zip |
45066: internal: Document forklevel, locallevel, and exit_pending.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/builtin.c | 6 | ||||
-rw-r--r-- | Src/exec.c | 4 | ||||
-rw-r--r-- | Src/params.c | 6 |
4 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 4821b09b6..742ddab9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2019-12-18 Daniel Shahaf <danielsh@apache.org> + * 45066: Src/builtin.c, Src/exec.c, Src/params.c: internal: + Document forklevel, locallevel, and exit_pending. + * 45065: Src/Makefile.in: Make 'make -s' print nothing when it does nothing. diff --git a/Src/builtin.c b/Src/builtin.c index 5fe5ea6d1..0ecabf854 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5601,7 +5601,11 @@ bin_getopts(UNUSED(char *name), char **argv, UNUSED(Options ops), UNUSED(int fun return 0; } -/* Flag that we should exit the shell as soon as all functions return. */ +/* Boolean flag that we should exit the shell as soon as all functions return. + * + * Set by the 'exit' builtin. + */ + /**/ mod_export int exit_pending; diff --git a/Src/exec.c b/Src/exec.c index 0d9d7de7c..50027654a 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -971,6 +971,10 @@ hashcmd(char *arg0, char **pp) return cn; } +/* The value that 'locallevel' had when we forked. When we get back to this + * level, the current process (which is a subshell) will terminate. + */ + /**/ int forklevel; diff --git a/Src/params.c b/Src/params.c index da7a6b4c5..5eaafe34e 100644 --- a/Src/params.c +++ b/Src/params.c @@ -44,7 +44,11 @@ #endif #endif -/* what level of localness we are at */ +/* What level of localness we are at. + * + * Hand-wavingly, this is incremented at every function call and decremented + * at every function return. See startparamscope(). + */ /**/ mod_export int locallevel; |