If we register a signal such as below, does this override another registered signal handler, that is last one wins? If so, is there a way to allow more than 1 for each signal.
signal(SIGABRT, SignalHandler);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nope; there can only be one signal handler per signal.
Note also the trying to do just about anything in a signal handler is impossible. You can’t make any system calls, can’t really allocate memory, and can’t use Objective-C.
As well, trying to catch SIGABRT is futile. By the time that is sent, it indicates that your app is well into the weeds. Trying to recover from such a state is rife with fragility.
What are you trying to do?