summary refs log tree commit diff
path: root/src/show.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-07-06 17:40:53 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-07-06 17:40:53 +0800
commitcb20b2cd727c892756ff3f144ebf92feb5590562 (patch)
treea8d571fa9bb0867d055d32747d4d2f7656e8e48b /src/show.c
parent[EVAL] Don't clear eflag in evalbackcmd (diff)
downloaddash-cb20b2cd727c892756ff3f144ebf92feb5590562.tar.gz
dash-cb20b2cd727c892756ff3f144ebf92feb5590562.zip
[VAR] Fix loss of variables when hash collides
Brian Koropoff reported that the new var patches broke the following
script:

#!/bin/dash
GDM_LANG="bar"
OPTION="foo"
unset GDM_LANG
# OPTION has mysteriously become unset
echo "$OPTION"

He correctly diagnosed this as a result of removing all variables
in the hash chain preceding the one that should be removed in
setvareq.

He also provided a patch to fix this.

This patch is based on his but without keeping the original vpp.
As a result, we now store new variables at the end of the hash
chain instead of the beginning.

To make this work, setvareq/setvar now returns the vp pointer
modified.  In case they're used to unset a variable the pointer
returned is undefined.  This is because mklocal needs it and
used to get it by assuming that the new variable always appear
at the beginning of the chain.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/show.c')
0 files changed, 0 insertions, 0 deletions
Rename listen to localJune McEnroe 2019-11-09Remove extended-join and invite-notifyJune McEnroe 2019-11-09Maintain stateCaps and offer them to clientsJune McEnroe 2019-11-09Parse capabilitiesJune McEnroe 2019-11-09Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe