From c13f7782351a4b6ff20f0c0504cb1caab81ea331 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 17 Sep 2021 12:54:21 +0100 Subject: ash: adjust reinitvar() to allow for FUNCNAME The new FUNCNAME variable, like LINENO, needs special treatment during forkshell. --- shell/ash.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 5adb95bc5..8e43acdb0 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2331,6 +2331,9 @@ change_skip_ansi(const char *newval UNUSED_PARAM) { skip_ansi_emulation(TRUE); } + +# define LINENO_INDEX (5 + 2 * ENABLE_ASH_MAIL + ENABLE_ASH_GETOPTS) +# define FUNCNAME_INDEX (LINENO_INDEX + 1) #endif static const struct { @@ -15939,7 +15942,12 @@ reinitvar(void) struct var **vpp, **old; for (i=0; i