Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Note: The signal-handler files can't be compiled with the -O2 switch and it's probably best if you only trap the signals you really intend to redirect, such as SIGSEGV (11). If you compile what we have here with the -O2 switch your cpu may hang if you try to exit using Ctrl-C for example. See implementation notes added to signal-handler.c below.
See part 1 for main functions to test this in C and C++.
To throw and catch stuff like segfaults in C++ it's...