|Subject:||Re: coproc and existing variables|
|Date:||Tue, 17 May 2016 17:14:33 -0400|
On Sun, Apr 24, 2016 at 2:17 PM, Chet Ramey <address@hidden> wrote:
it seems reasonable to follow printf/read/mapfile and not overwrite read-
only variables used as coproc names. getopts will remain an outlier.
getopts can probably benefit from a nameref check too, otherwise it can be exploited to unset arbitrary readonly variables.
$ declare -r RO=foo; declare -n OPTARG; getopts x x; declare -p RO bash: declare: RO: not found
|[Prev in Thread]||Current Thread||[Next in Thread]|