On 7/31/14, 3:36 PM, Chris F.A. Johnson wrote: > On Thu, 31 Jul 2014, Chet Ramey wrote: >> On 7/31/14, 10:51 AM, Linda Walsh wrote: > ... >>> I thought the idea of RO vars being passed to children was considered >>> desirable? >> >> As Greg says, there's no existing mechanism to do that using the >> environment, which is the only way to communicate across exec(2). I >> could invent something, but what would be the point? > > It's not hard to do, e.g. as a comma-separated list of readonly > variables: > > export READONLY_VARS=foo,bar,why,not foo bar why not
Sure. You're inventing an out-of-band communication mechanism that uses the environment. The advantage of this is that it's done outside the shell at the script level. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/