Пример #1
0
static void crash_handler(int signo)
{
	fprintf(stderr, "collie exits unexpectedly (%s).\n", strsignal(signo));

	sd_backtrace();

	exit(EXIT_SYSFAIL);
}
Пример #2
0
static void crash_handler(int signo)
{
	sd_emerg("sheep exits unexpectedly (%s).", strsignal(signo));

	sd_backtrace();
	sd_dump_variable(__sys);

	reraise_crash_signal(signo, 1);
}
Пример #3
0
static void crash_handler(int signo, siginfo_t *info, void *context)
{
	sd_emerg("sheep exits unexpectedly (%s), "
		"si pid %d, uid %d, errno %d, code %d",
		strsignal(signo), info->si_pid, info->si_uid,
		info->si_errno, info->si_code);

	sd_backtrace();
	sd_dump_variable(__sys);

	reraise_crash_signal(signo, 1);
}
Пример #4
0
static void crash_handler(int signo)
{
	sd_err("dog exits unexpectedly (%s).", strsignal(signo));

	sd_backtrace();

	/*
	 * OOM raises SIGABRT in xmalloc but the administrator expects
	 * that dog exits with EXIT_SYSFAIL.  We have to give up
	 * dumping a core file in this case.
	 */
	if (signo == SIGABRT)
		exit(EXIT_SYSFAIL);

	reraise_crash_signal(signo, EXIT_SYSFAIL);
}