Discussion:
[ast-developers] "_.fd: no parent" with init function in user-defined type...
Roland Mainz
2013-09-12 20:19:11 UTC
Permalink
Hi!

----

We hit another issue with user-defined types vs. initalisation.
The following testcase...
-- snip --
typeset -T p_t=( integer fd ;
compound events=( bool pollin=false ; )
compound revents=( bool pollin=false ; )
function pinit { (( _.fd=$1 )) ; (( _.events.pollin=true )) ; } ;
)
compound c ; p_t -a c.pl
integer i maxfd=$(getconf "OPEN_MAX")

(( maxfd=1 )) # space for stdin/stdout/stderr/dirfd
for (( i=0 ; i < maxfd ; i++ )) ; do
c.pl[$((i*17))].pinit 0
done
-- snip --
... should execute without errors but ast-ksh.2013-09-11 on SuSE
12.3/AMD64/64bit prints this:
-- snip --
$ ksh x.sh
x.sh[12]: c.pl[0].pinit: line 5: _.fd: no parent
-- snip --

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
ольга крыжановская
2013-09-13 18:41:22 UTC
Permalink
David, Roland forgot to say, that this bug blocks his update patch for poll(1).

Olga
Post by Roland Mainz
Hi!
----
We hit another issue with user-defined types vs. initalisation.
The following testcase...
-- snip --
typeset -T p_t=( integer fd ;
compound events=( bool pollin=false ; )
compound revents=( bool pollin=false ; )
function pinit { (( _.fd=$1 )) ; (( _.events.pollin=true )) ; } ;
)
compound c ; p_t -a c.pl
integer i maxfd=$(getconf "OPEN_MAX")
(( maxfd=1 )) # space for stdin/stdout/stderr/dirfd
for (( i=0 ; i < maxfd ; i++ )) ; do
c.pl[$((i*17))].pinit 0
done
-- snip --
... should execute without errors but ast-ksh.2013-09-11 on SuSE
-- snip --
$ ksh x.sh
x.sh[12]: c.pl[0].pinit: line 5: _.fd: no parent
-- snip --
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
ast-developers at lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ olga.kryzhanovska at gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
Loading...