Using signals

There are some special considerations when using signals within a dbx plugin. If a plugin raises any of the following signals, dbx will handle them in its own signal catcher routine:
  • SIGSEGV
  • SIGFPE
  • SIGILL
  • SIGABND
  • SIGINT

This routine will notify the user of the exception via a message to the standard error stream.

If a plugin needs to perform its own signal handling, it should restrict itself to the two signals SIGUSR1 and SIGUSR2. This will prevent dbx and the plugin from interfering with each other's signals. Installing handlers for other signals can cause undefined behavior in dbx.

If more than one plugin installs a handler for the same signal, the last plugin loaded will receive the signal when it is raised. To avoid this situation, ensure that the plugins that are loaded do not install overlapping signal handlers.