Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14072
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Martijn Dekker <martijn@inlv.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: [BUG] 'unset' fails silently under specific conditions |
| Date | Tue, 1 May 2018 20:29:12 +0200 |
| Lines | 22 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.13220.1525199363.27995.bug-bash@gnu.org> (permalink) |
| References | <a16a34cf-eea7-16b8-76d8-e05d0fe2cc32@inlv.org> <1295e1ea-73c0-e479-da03-b784ec975030@inlv.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1525199363 26136 208.118.235.17 (1 May 2018 18:29:23 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org, Chet Ramey <chet.ramey@case.edu> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
| In-Reply-To | <1295e1ea-73c0-e479-da03-b784ec975030@inlv.org> |
| Content-Language | en-GB |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x [fuzzy] |
| X-Received-From | 37.59.109.123 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14072 |
Show key headers only | View raw
Op 01-05-18 om 18:45 schreef Martijn Dekker:
> It appears that it must have one function calling another, and that
> other function having an assignment preceding a special builtin, for
> 'unset' to fail silently for the variable so assigned.
Actually it can be simplified further: the following also outputs "BUG:
still set". I fact, with this version, the bug manifests all the way
down to bash 2.05b!
POSIXLY_CORRECT=y
func() {
var=1
var=2 : # or 'var=2 set foo', or another special builtin
unset -v var # bug: fails silently
}
func
echo ${var+"BUG: still set"}
Thanks,
- M.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: [BUG] 'unset' fails silently under specific conditions Martijn Dekker <martijn@inlv.org> - 2018-05-01 20:29 +0200
csiph-web