[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "GROUPS" is read-only, but only sort of
From: |
Jonathan Kamens |
Subject: |
Re: "GROUPS" is read-only, but only sort of |
Date: |
Fri, 3 Nov 2000 15:05:46 -0500 |
> Date: Fri, 3 Nov 2000 13:04:07 -0500
> From: Chet Ramey <chet@nike.ins.cwru.edu>
>
> The current behavior is documented.
The fact that something is documented doesn't make it OK.
This makes bash incompatible with every other Bourne-compatible
shell. In fact, it makes bash a Bourne-*in*compatible shell. Scripts
which are written to use only standard sh constructs can fail
silently, with no obvious explanation, under bash, just for using a
variable named GROUPS.
> GROUPS was originally readonly. People complained that they could not even
> unset it (since readonly variables can't be unset), and that screwed up
> their scripts. I received multiple complaints about the oracle install
> script, for one.
>
> The current behavior is a compromise. GROUPS is essentially readonly,
> but may be unset.
But all of those scripts will continue to break, but in a completely
different way! How can an installation script know that before it's
allowed to set a variable named GROUPS, it has to unset it?
At least if attempting to reset GROUPS caused a visbible error, people
writing or maintaining such scripts would know immediately what the
problem is. I fail to see how the current behavior can be preferable
to that.
jik