[Openmcl-devel] async signals
    Gábor Melis 
    mega at hotpop.com
       
    Thu Sep  1 00:52:11 PDT 2005
    
    
  
Hello
Please think of this as a cross-fertilization attempt between 
implementations :-), although I hope SBCL stands to gain more from your 
understanding of the subject.
Providing sane semantics for portable code is not easy when async 
signals are involved especially for unwind-protect. The problems are 
described here:
  http://www.caddr.com/macho/archives/sbcl-devel/2005-8/5881.html
Some thoughts and a possible, but quite down to earth, 
let's-work-around-most-of-it strategy is here:
  http://www.caddr.com/macho/archives/sbcl-devel/2005-8/5909.html
Since then I've realized that most signal handlers (sigprof, 
sigchld, ...) can be reasonably expected not to unwind the stack beyond 
the handler itself, almost as if they had a separate thread. This kind 
of safety can be optionally enforced by the implementation on a 
per-handler basis.
That leaves C-c (that brings up the debugger), with-timeout and 
terminate-thread all of which are implemented by interrupt-thread that 
plays the part of openmcl's process-interrupt. Oh, and cleanly shutting 
down a thread/process seems problematic for the same reasons.
I've read that openmcl checks for pending interrupts at safe-points. 
Where are these safe points? Do they help with issues above?
Thanks, Gábor Melis
    
    
More information about the Openmcl-devel
mailing list