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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to