Signal Handlers and TIBCO Enterprise Runtime for R
TERR supports installing signal handlers.
Signal handlers are used to catch illegal operations (such as
referencing an illegal memory location) that occur in foreign code called via
the
.C()
or
.Call()
functions. If an illegal operation is caught by
a signal handler, it will generate an error "Unhandled exception in foreign
function" rather than crashing the process. Currently, these signal handlers
are disabled by default, because they can interfere with signal handlers used
by other software running in the same process. For example, we discovered
problems when using Java and JDBC to access a database.
Sometimes when you need to investigate unexpected failures in foreign
code, you might find it useful to enable the signal handlers during development
to catch illegal operations. The signal handlers can be enabled when starting
the
TERR
console application by specifying the option
--enable-signal-handlers
.