Beispiel #1
0
static void
act_sig_handle_segv(int sig_num, siginfo_t* info, void* ctx)
{
	fprintf(stdout, "SIGSEGV received\n");
	PRINT_BACKTRACE();
	reraise_signal(sig_num);
}
Beispiel #2
0
void
Semaphore::down(void)
{
#ifdef DEBUG
  if (RT::OS::isRealtime()) {
    ERROR_MSG("Detected unsafe down attempt in RT thread\n");
    PRINT_BACKTRACE();
    return;
  }
#endif // DEBUG

  --count;
  while (count < 0)
    usleep(1000);
}
Beispiel #3
0
static void signal_handler(int signum) {
	static int count = 0;

	/* Only handler handle signals in the parent */
	if (getpid() != parentThread) return;

	DEBUG_MSG("signal_handler : signal received\n");
#ifdef DEBUG
	PRINT_BACKTRACE();
#endif // DEBUG

	if (count++) _exit(-EFAULT);

	DEBUG_MSG("signal_handler : finished\n");
	exit(0);
}