Discussion:
[ast-developers] Copying ".sh.stats" causes the copied values to change between each access...
Roland Mainz
2013-08-13 17:43:15 UTC
Permalink
Hi!

----

IMO the same issues as Cedric reported for copying the ".sh.sig"
compound variable ... if I copy the ".sh.stats" compound variable with
a ast-ksh.2013-08-07 on Solaris 11/B145/AMD64/64bit the _copied_
values continue to change:
-- snip --
$ ksh -c 'compound c; compound -a c.car ; compound src=( integer i=19
) ; c.car[6]=.sh.stats ; { print -v c ; print -v c ; } | fgrep
nv_open'
typeset -r -i nv_opens=53
typeset -r -i nv_opens=74
-- snip --

The reduced testcase looks like this:
-- snip --
$ ksh -c 'compound c ; c=.sh.stats ; { print -v c ; print -v c ; } |
fgrep nv_open'
typeset -r -i nv_opens=46
typeset -r -i nv_opens=63
-- snip --

The expected behaviour is that "nv_opens" remains identical for both
print -v calls because it's a copy...

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
Loading...