You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 16, 2025. It is now read-only.
$ ksh --version
version sh (AT&T Research) 93u+m/1.0.0-beta.2 2021-12-17
I know, not the latest version so I'm terribly sorry if I report already fixed issue.
$ cat aaa
#!/usr/bin/ksh
VAR=yes
typeset -p VAR
$ chmod +x aaa
$ ksh -c 'readonly VAR=foo ; export VAR; ./aaa'
./aaa: line 1: VAR: is read only
# similarly integer variables
$ ksh -c 'typeset -i VAR=123; export VAR; ./aaa'
typeset -x -i VAR=0
I would expect the new process inherit the exported variable, but not the type of variable. The script can protect himself against integer variables by running typeset VAR=yes which is not reasonable (to me) to do for any and all variables used. I don't know if there is a way to un-readonly a variable at all.