summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-26 18:24:56 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-26 18:24:56 (EST)
commit6fc35cb79a8a97408da899b52b0859e1662e2076 (patch)
treeeb24d0cc4f885c29df2baab8db0647256007391d
parentde858643456ec6b866037f0b80497e1c1a523e59 (diff)
downloadeggshell-6fc35cb79a8a97408da899b52b0859e1662e2076.zip
eggshell-6fc35cb79a8a97408da899b52b0859e1662e2076.tar.gz
eggshell-6fc35cb79a8a97408da899b52b0859e1662e2076.tar.bz2
eshld/eshrt: Lose all command substitutions in ctxsw
-rw-r--r--eshld/eshrt.esh13
1 files changed, 6 insertions, 7 deletions
diff --git a/eshld/eshrt.esh b/eshld/eshrt.esh
index 3d86b79..14f634b 100644
--- a/eshld/eshrt.esh
+++ b/eshld/eshrt.esh
@@ -72,13 +72,12 @@ __fn_ctxsw()
${__fn_tu});;
?*)
# Unset static variables and functions from previous TU.
- case "$(eval "printf '%s' \
- \"\${__${__prev_tu}_static_vars}\"")" \
- in ?*)
+ eval "__val=\${__${__prev_tu}_static_vars}"
+ case "${__val}" in ?*)
eval "unset \${__${__prev_tu}_static_vars}"
;; esac
- for __fn in $(eval printf '%s' \
- "\"\${__${__prev_tu}_static_fns}\""); do
+ eval "__val=\${__${__prev_tu}_static_fns}"
+ for __fn in ${__val}; do
unset -f "${__fn%:*}"
done
;; esac
@@ -88,8 +87,8 @@ __fn_ctxsw()
# Set static variables and function for the current TU.
eval "__val=\${__${__fn_tu}_static_var_vals}"
eval "${__val}"
- for __fn in $(eval printf '%s' \
- "\"\${__${__fn_tu}_static_fns}\""); do
+ eval "__val=\${__${__fn_tu}_static_fns}"
+ for __fn in ${__val}; do
eval "${__fn%:*}() { ${__fn#*:}; }"
done
;; esac