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

Re: Switching /bin/sh to dash without dash essential



On 2009-07-24 15:49:15 +0000, brian m. carlson wrote:
> On Fri, Jul 24, 2009 at 08:31:55AM -0700, Russ Allbery wrote:
> > zsh has also historically been fairly buggy in corner cases as
> > /bin/sh and requires explicit commands to make it
> > Bourne-compatible. Autoconf has had to add a bunch of workarounds
> > for zsh as sh that I'm sure most of our shell scripts don't have.
> 
> Actually, if it's invoked as /bin/sh, it is supposed to be
> Bourne-compatible.

I suppose that (both of) you mean POSIX-compatible (as there are
differences between the traditional Bourne shell and POSIX shells).

>  That's my experience with the current version:
> 
>   lakeview ok % emulate; /bin/sh -c emulate
>   zsh
>   sh
> 
> I don't know what other versions do.  I'm working on finding bugs with
> zsh as /bin/sh; see #510358.  If anyone knows about a good /bin/sh
> (POSIX, XSI, or Debian) testsuite, please let me know off-list.

I've also reported a number of zsh POSIX-compatibility bugs. There
are still differences between shells concerning "set -e" [*], and
AFAIK, POSIX hasn't been made clear yet. I wonder how this is dealt
with in the switch from bash to dash for /bin/sh.

[*] See http://www.in-ulm.de/~mascheck/various/set-e/

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


Reply to: