Hi!

----

While doing some tests with ast-ksh.2013-02-22 I noticed an odd
behaviour with signal traps:
The following example should (in theory) run in an endless loop... but
ast-ksh.2013-02-22 prints only one iteration and then quits:
-- snip --
$ ~/bin/ksh -c 'trap "echo blabla ; kill -RTMIN $$ ; true" RTMIN ;
kill -RTMIN $$ ; true ; echo done'
blabla
done
-- snip --

Why does that happen ? Both bash and dash print multiple lines with
"blabla" ... either until the stack is exhausted (leading to a
SIGSEGV/SIGBUS) or an internal limit is eached... and AFAIK ksh93
should allow endless loops, too... but without crashing or having
issues with internal limits.

Would it be standard-conforming to change the behaviour to save a
signal (and siginfo data) while a trap for the same signal number and
execute the trap again for each entry in that list ? That would allow
that traps are executed as expected but without recursing deeper and
deeper into the stack until it is exhausted (alternatively... if this
is not conforming behaviour... it may be nice to offer an option for
this signal-deferring-until-trap-is-done behaviour) ...

----

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