Why can’t I ignore SIGSEGV signal?

Your code is ignoring SIGSEGV instead of catching it. Recall that the instruction that triggered the signal is restarted after handling the signal. In your case, handling the signal didn’t change anything so the next time round the offending instruction is tried, it fails the same way. If you intend to catch the signal change … Read more

longjmp() from signal handler

From the man page for longjmp: POSIX does not specify whether longjmp() will restore the signal context. If you want to save and restore signal masks, use siglongjmp() Your second question: Yes, the function will return -2 because longjmp() will cause it to go to the setjmp(buffer) part, but the timing will have to be … Read more

How to handle a ctrl-break signal in a command line interface

OK – this is working for me on Windows & is portable – notice the #ifdef SIGBREAK – this isn’t a standard signal. #include <csignal> #include <iostream> #include <ostream> #include <string> using namespace std; namespace { volatile sig_atomic_t quit; void signal_handler(int sig) { signal(sig, signal_handler); quit = 1; } } int main() { signal(SIGINT, signal_handler); … Read more

Accurately reading of iPhone signal strength

I’m playing with this function and I’ve noticed you’re calling it in an interesting way. I’m calling it by adding CoreTelephony.framework as a compile-time link. For the function itself, you’ll want to declare it’s prototype somewhere (perhaps immediately above the method you call from): int CTGetSignalStrength(); This needs to be declared since it isn’t in … Read more

Why does PySide implicitely create object members from class members for Signals?

They are not copies. If you check the type of those, you’ll see that the class attribute is PySide.QtCore.Signal and the instance attribute is PySide.QtCore.SignalInstance. print “type(obj1.sig): {}”.format(type(obj1.sig)) print “type(obj2.sig): {}”.format(type(obj2.sig)) print “type(Klass.sig): {}”.format(type(Klass.sig)) # type(obj1.sig): <type ‘PySide.QtCore.SignalInstance’> # type(obj2.sig): <type ‘PySide.QtCore.SignalInstance’> # type(Klass.sig): <type ‘PySide.QtCore.Signal’> This is necessary because of the way Qt defines … Read more

Oracle Pro*C/OCI install handlers for SIGSEGV/SIGABRT and friends – why, and how to disable?

Signal handling and diagnostic framework considerations: the OCI diagnostic framework installs signal handlers that may impact any signal handling that you use in your application. You can disable OCI signal handling by setting DIAG_SIGHANDLER_ENABLED=FALSE in the sqlnet.ora file. Refer to “Fault Diagnosability in OCI” in Oracle Call Interface Programmer’s Guide for information. Please try to … Read more