myMPD
Internal API documentation
Loading...
Searching...
No Matches
signal.h File Reference

Signal handling. More...

#include <signal.h>
#include <stdbool.h>
Include dependency graph for signal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool signal_eventfd_init (void)
int signal_eventfd_get (void)
void signal_eventfd_close (void)
bool signal_eventfd_handler (void)

Variables

sig_atomic_t s_signal_received
 Signal received indicator.

Detailed Description

Signal handling.

Function Documentation

◆ signal_eventfd_close()

void signal_eventfd_close ( void )

Closes the eventfd and sets it to -1.

◆ signal_eventfd_get()

int signal_eventfd_get ( void )

Returns the signal eventfd.

Returns
the signal eventfd

◆ signal_eventfd_handler()

bool signal_eventfd_handler ( void )

Handles the signal_eventfd event.

Returns
false if the parent loop should exit, else true

◆ signal_eventfd_init()

bool signal_eventfd_init ( void )

Initializes the eventfd and installs a minimal signal handler for SIGTERM, SIGINT, and SIGHUP.

Returns
true on success, else false