NetBSD-Bugs archive

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

Re: standards/42828: Almquist shell always evaluates the contents of ${ENV} even if non-interactive



    Date:        Thu, 18 Feb 2010 02:14:07 -0500
    From:        Richard Hansen <rhansen%bbn.com@localhost>
    Message-ID:  <4B7CE8BF.3020401%bbn.com@localhost>

  | I agree that the POSIX design is suboptimal, but at this point there is 
  | greater value in being compatible than in being right.

In some cases I might agree, in this one, I don't.

  | Cross-platform scripts can't rely on NetBSD's nonstandard behavior,

One of us is confused about what $ENV is for?   What scripts are ever going to
set that (clear(unset) it perhaps, but set it?)   Particularly the way you
expect it to work - where it applies only to interactive shells, which isn't
something many scripts ever care about.

Do you have a real example of something that breaks (other than a conformance 
test) because of this?   That is, excluding user environments, we know they're
different.

  | It would be unfortunate if an ordinary script ran everywhere except NetBSD.

Yes, but there are thousands of scripts around, the only problems I have ever
seen reported relate to scripts that use non-standard shell features and
occasionally, an undisputed bug.   I've never seen a report of a problem
that related to $ENV and a script.

  | but I believe the long-term benefit from standards compliance will outweigh 
  | the short-term pain.

Better long term benefit would be to convince the standard to be rational.
We don't achieve that (not any hope of achieving that) if everyone just does
what they say because they say it, and not because it is the right thing to
do.   Following the standards is great when it is a matter of a choice between
two ways of which we could pick either - and sometimes when it is a matter of
adding something that we don't really see the need for, but does no real harm
to have - but never when their design is flawed.

kre



Home | Main Index | Thread Index | Old Index