autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting zsh into POSIX mode


From: Eric Blake
Subject: Re: getting zsh into POSIX mode
Date: Thu, 09 Jul 2009 06:13:52 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 7/8/2009 6:46 AM:
> According to the zsh developers, 'emulate sh' is insufficient to get zsh
> into full POSIX compatibility; you either have to use 'emulate -R sh', or
> start with either argv[0] or the environment variable ARGV0 set to sh.
> http://thread.gmane.org/gmane.comp.shells.zsh.devel/18760/focus=18763
> 
> Is this something we need to account for in m4sh?

In looking at it further, one of the differences is that zsh enables
notify mode (set -b) by default, although POSIX states that notify mode
should default to off (set +b).  'emulate sh' does not change the current
state of the notify option, but 'emulate -R sh' forces it to off.
Generally, notify does not affect non-interactive script behavior, since
it only matters when monitor (set -m) is enabled, and that is off by
default for non-interactive use.  But for parallel testsuites, we really
DO want to have notify disabled so that we don't have to deal with
asynchronous outputs to stderr as test groups complete.  I'm still not
sure whether we need to go full force with 'emulate -R sh', as I'm not
sure what other options are changed only by the latter, but if m4sh
doesn't change to use 'emulate -R sh', then autotest needs to add a line
to use 'set +b' before doing parallel tests.

Meanwhile, the zsh maintainers are considering patches to make 'set -m'
work in a non-interactive environment, although I have not yet had a
chance to build a bleeding edge zsh to try it out.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpV3wAACgkQ84KuGfSFAYCypQCgjBhAs8jAPQSxnMRD6UJvIu6K
3Y4AnijacbgXyvQI+qNE2HHuHW4OGxUu
=NFBg
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]