Discussion:
[ast-developers] print ${!.sh.sig@}, print -v .sh.sig and typeset -c cs=.sh.sig not working for .sh.sig
Cedric Blancher
2013-07-12 18:14:30 UTC
Permalink
Three bugs from real world application development and debugging:

1. print ${!.sh.sig@} doesn't work for .sh.sig. It should enumerate
all valid subvariable names for this siginfo but only prints .sh.sig
twice:
ksh -c 'trap "print \${!.sh.sig@}" RTMIN ; kill -RTMIN $$ ; true'
.sh.sig .sh.sig

2. print -v .sh.sig doesn't work. It should print the contents of this
compound variable:
ksh -c 'trap "print -v .sh.sig" RTMIN ; kill -RTMIN $$ ; true'
(
)

3. typeset -c on .sh.sig data to copy the data into slots of a
compound variable array doesn't work either. It should print an array
two two elements, once per RTMIN siginfo data:
ksh -c 'compound -a cs ; integer csi=0 ; trap "typeset -c
cs[csi++]=.sh.sig" RTMIN ; kill -RTMIN $$ ; kill -RTMIN $$ ; print
"csi=$csi" ; print -v cs'
csi=2

Ced
--
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur
Loading...