# HG changeset patch # User "Yann E. MORIN" # Date 1217168719 0 # Node ID e8c68d0d1a0c14e82309f07ce755fdd355b55394 # Parent f02cd568eec99bcac9d722d0df65a2033ce7d58f Re-enable the restart functionality by removing some variables from the saved environment. /trunk/scripts/functions | 16 10 6 0 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff -r f02cd568eec9 -r e8c68d0d1a0c scripts/functions --- a/scripts/functions Sun Jul 27 12:03:34 2008 +0000 +++ b/scripts/functions Sun Jul 27 14:25:19 2008 +0000 @@ -636,13 +636,17 @@ esac CT_DoLog DEBUG " Saving environment and aliases" - # We must omit shell functions + # We must omit shell functions, and some specific bash variables + # that break when restoring the environment, later. We could do + # all the processing in the awk script, but a sed is easier... set |awk ' - BEGIN { _p = 1; } - $0~/^[^ ]+ \(\)/ { _p = 0; } - _p == 1 - $0 == "}" { _p = 1; } - ' >"${state_dir}/env.sh" + BEGIN { _p = 1; } + $0~/^[^ ]+ \(\)/ { _p = 0; } + _p == 1 + $0 == "}" { _p = 1; } + ' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d; + /^(UID|EUID)=/d; + /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh" CT_DoLog DEBUG " Saving CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'" CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"