On Mon, 16 Apr 2012 14:29:41 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> Glenn, using export _AST_FEATURES=value to change getconf UNIVERSE
> only works per process, but does not affect built ins. I made 2
> examples to demonstrate this:

> The example should print "bsd" and "att" but it does not work because
> _AST_FEATURES is only probed at process start up:
> ksh -c 'builtin getconf ; _AST_FEATURES="UNIVERSE = bsd" getconf
> UNIVERSE ; _AST_FEATURES="UNIVERSE = att" getconf UNIVERSE'
> att
> att

> > it is preferable to change the writeable values via getconf(1)

that statement probably wasn't strong enough
I've added this to getconf --man ENVIRONMENT:

  _AST_FEATURES is an implementation detail of process inheritance;
  it may change or vanish in the future; don't rely on it.

this works:

$ ksh -c '
        for u in att bsd
        do      getconf UNIVERSE = $u
                print -n $(getconf UNIVERSE)" "
                sum <<<"hello sum"
        done'
att 915 1
bsd 47476 1

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to