[LLVMbugs] [Bug 3965] New: SIGINT handler not restored after	calling ParseAST()
    bugzilla-daemon at cs.uiuc.edu 
    bugzilla-daemon at cs.uiuc.edu
       
    Thu Apr  9 14:14:29 PDT 2009
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=3965
           Summary: SIGINT handler not restored after calling ParseAST()
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: alexei.svitkine at gmail.com
                CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2812)
 --> (http://llvm.org/bugs/attachment.cgi?id=2812)
exit(1); -> raise(Sig); patch
This is similar to http://llvm.org/bugs/show_bug.cgi?id=3848
However, the problem is that even when there is no custom interrupt function
set, the signal handler does an exit(1); when receiving a SIGINT, rather than
calling the default handler.
It seems the custom signal handler persists even after clang returns from
ParseAST().
The attached patch changes the behaviour of receiving a SIGINT to run the
previous handler rather than calling exit(1).
A better solution may be to actually unregister the damn handler before clang
exits from ParseAST() - but I'm not sure where this code would have to go.
-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
    
    
More information about the llvm-bugs
mailing list