On 01/20/2011 01:50 PM, Ralf Wildenhues wrote:
> Ahh, but it would have needed to be in that very patch, unfortunately.
> As it is, my last patch fixed Tru64, but regressed NetBSD by roughly the
> same number of failures, because `unset NOT_SET' fails there.

But bash 2.05a would dump core on 'unset NOT_SET', as documented in the
autoconf manual.  So the portable workaround that should keep NetBSD's
sh -e happy is:

foo=; unset foo

if you aren't sure in advance whether foo is set.

$ /bin/sh -ce 'unset foo; echo hi'
$ /bin/sh -ce 'foo=; unset foo; echo hi'
hi

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to