summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-26 18:24:04 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-26 18:24:04 (EST)
commitde858643456ec6b866037f0b80497e1c1a523e59 (patch)
treebbc91b0add0a30b4a22a8a227f6c96d4d9478438
parent2104a1ce075779fa6bd4497eebd91d84e97c546d (diff)
downloadeggshell-de858643456ec6b866037f0b80497e1c1a523e59.zip
eggshell-de858643456ec6b866037f0b80497e1c1a523e59.tar.gz
eggshell-de858643456ec6b866037f0b80497e1c1a523e59.tar.bz2
research: Lose all command substitutions in ctxsw
-rw-r--r--research/research5.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/research/research5.sh b/research/research5.sh
index 90e475f..77a126d 100644
--- a/research/research5.sh
+++ b/research/research5.sh
@@ -48,8 +48,8 @@ __fn_ctxsw()
?*)
# Unset static variables and functions from previous TU.
eval "unset \${__${__prev_tu}_static_vars}"
- 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
@@ -57,10 +57,10 @@ __fn_ctxsw()
${__prev_tu});;
?*)
# Set static variables and function for the current TU.
- eval "$(eval "printf '%s ' \
- \${__${__fn_tu}_static_var_vals}")"
- for __fn in $(eval printf '%s' \
- "\"\${__${__fn_tu}_static_fns}\""); do
+ eval "__val=\${__${__fn_tu}_static_var_vals}"
+ eval "${__val}"
+ eval "__val=\${__${__fn_tu}_static_fns}"
+ for __fn in ${__val}; do
eval "${__fn%:*}() { ${__fn#*:}; }"
done
;; esac