# `./fio-stl/002 signals.h`

8 public symbols.

### Macros

#### `FIO_SIGNAL_USER1`

```c
#define FIO_SIGNAL_USER1             SIGUSR1
```



_Symbol type:_ `macro`

#### `FIO_SIGNAL_USER2`

```c
#define FIO_SIGNAL_USER2             SIGUSR2
```



_Symbol type:_ `macro`

#### `FIO_SIGNAL_USER_UNREGISTERED`

```c
#define FIO_SIGNAL_USER_UNREGISTERED SIGUSR2
```



_Symbol type:_ `macro`

### Types

#### `fio_signal_monitor_args_s`

```c
typedef struct {
/** The signal number to listen for. */
int sig;
/** The callback to run - leave NULL to ignore signal. */
void (*callback)(int sig, void *udata);
/** Opaque user data. */
void *udata;
/** Should the signal propagate to existing handler(s)? */
bool propagate;
/** Call (safe) callback immediately? or wait for `fio_signal_review`? */
bool immediate;
} fio_signal_monitor_args_s
```



_Symbol type:_ `type`

### Functions

#### `fio_signal_monitor`

```c
int fio_signal_monitor(fio_signal_monitor_args_s args)
```

Starts to monitor for the specified signal, setting an optional callback.

_Symbol type:_ `function`

#### `fio_signal_monitor`

```c
#define fio_signal_monitor(...)   \
  fio_signal_monitor((fio_signal_monitor_args_s){__VA_ARGS__})
```



_Note:_ this may be a macro only / macro wrapper for a function.

_Symbol type:_ `macro`

#### `fio_signal_review`

```c
int fio_signal_review(void)
```

Reviews all signals, calling any relevant callbacks.

_Symbol type:_ `function`

#### `fio_signal_forget`

```c
int fio_signal_forget(int sig)
```

Stops monitoring the specified signal.

_Symbol type:_ `function`

-----------------------------------------------------
