On Tue, Mar 19, 2013 at 2:06 PM, Glenn Fowler <[email protected]> wrote:
> ast-ksh 2013-03-18 alpha source posted

Thanks... :-)

... the ksh93/RELEASE says:
-- snip --
13-03-11  The trap command now blocks signals that have traps until the
          trap command completes.
13-03-11  Signals that have traps that occur while processing a trap are
          deferred until the trap command completes.
-- snip --
... but the issues related to "loosing" signals when they "attack in
swarms" is still present (see
http://lists.research.att.com/pipermail/ast-developers/2013q1/002310.html
for a sort analysis and possible solution) ... for example:
The following mini-script should print a compound variable array with
10 elements, containing the numbers 0-9 in random order:
-- snip --
$ ./arch/linux.i386-64/bin/ksh -c 'compound -a ar ; trap "ar+=(
value=\${.sh.sig.value} pid=\${.sh.sig.pid} )" RTMIN ; integer
thispid=$$ ; for ((i=0 ; i < 10 ; i++ )) ; do  kill -q $i -RTMIN
$thispid &  ; done ; while ! wait ; do true ; done ; print "wait=$?" ;
print -v ar ; print done'
wait=0
(
        (
                pid=12500
                value=16#0
        )
        (
                pid=12502
                value=16#1
        )
        (
                pid=12500
                value=16#ffffffff00000000
        )
        (
                pid=12500
                value=16#0
        )
        (
                pid=12517
                value=16#9
        )
)
done
-- snip --
... but with ast-ksh.2013-03-18 a more or less random number of array
elements is printed because some of the signals get "lost". And note
the duplicate "value" entries and the "special" entry with
"value=16#ffffffff00000000" ... ;-((

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to