Clive describes the essence of the exec API. The environment is just an array
of string pointers, each ending in '\0'.
POSIX actually encourages standard commands and utilities to tolerate them
if such are passed on by an application. They should then be passed on
unchanged, I expect.
A quick google on posix gives this reference:
http://opengroup.org/onlinepubs/007908799/xbd/envvar.html (1997)
Ksh itself can definitely not import a variable a-b, as it conflicts
with well defined posix shell behaviour: ${a-b} refers to the value
of a, or the text "b" if variable a is empty.
Frankly I would encourage any shell to follow this behaviour, to
allow for some common ground...
Cheers,
Henk
[EMAIL PROTECTED] wrote:
There are plenty of other characters allowed:
setenv 'h e h e' foo
The environment block is just text, I don't think you can really stop
characters other than '=' and 0x00 begin used.
Tom�s Smetana:
Sent: Fri 26/09/2008 13:38
To: [email protected]
Subject: [ast-users] ksh/tcsh and variables with hyphen in name
Hello,
I'm having problem with tcsh/ksh interaction:
tcsh allows an environment variable to contain a hyphen in its name, so the
following would work in tcsh:
setenv a-b foo
However when starting ksh from tcsh such a variable is not visible in ksh's
environment and it is not passed on when e.g. starting another tcsh instance
from ksh.
My question is: shouldn't be such variables tolerated in the environment?
Thanks in advance for the answer.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users