netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
fault.c File Reference
`#include <signal.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <unistd.h>`
`#include <atalk/logger.h>`

## Macros
#define | SIGNAL_CAST (void (*)(int))
#define | SAFE_FREE(x)
#define | BACKTRACE_STACK_SIZE 64

## Functions
void | netatalk_panic (const char *why)
static void | fault_report (int sig)
static void | sig_fault (int sig)
void | fault_setup (void(*fn)(void *))

## Variables
static void(* | cont_fn )(void *)
static void(*)(int) | CatchSignal (int signum, void(*handler)(int))

## Macro Definition Documentation

## ◆ BACKTRACE_STACK_SIZE

#define BACKTRACE_STACK_SIZE 64

## ◆ SAFE_FREE

#define SAFE_FREE | ( |  | x | ) |

Value:
do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
NULL
#define NULL
Definition utf8util.c:47

## ◆ SIGNAL_CAST

#define SIGNAL_CAST (void (*)(int))

## Function Documentation

## ◆ fault_report()

void fault_report | ( | int | sig | ) |
| static

report a fault

## ◆ fault_setup()

void fault_setup | ( | void(* | fn )(void *) | ) |

setup our fault handlers

## ◆ netatalk_panic()

void netatalk_panic | ( | const char * | why | ) |

Something really nasty happened - panic !

## ◆ sig_fault()

void sig_fault | ( | int | sig | ) |
| static

catch serious errors

## Variable Documentation

## ◆ CatchSignal

void(*)(int) CatchSignal(int signum, void(*handler)(int)) | ( | int | signum,
|  | void(* | handler )(int) )
| static

Catch a signal. This should implement the following semantics:

1. The handler remains installed after being called.
2. The signal should be blocked during handler execution.

## ◆ cont_fn

void(* cont_fn) (void *) | ( | void * |  | ) |
| static