0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-30 02:32:43 +01:00
construct/charybdis
2018-01-10 00:55:08 -08:00
..
.gitignore Refactor repository layout. 2016-07-21 20:51:02 -07:00
charybdis.cc ircd::fs: Use direct kernel interface rather than glibc aio nonsense. 2018-01-10 00:55:08 -08:00
charybdis.h charybdis: Add -execute command line option; support console execute. 2017-11-30 11:23:44 -08:00
console.cc ircd: Various fixes to net related call points. 2018-01-06 23:27:02 -08:00
getopt.cc charybdis: Move getopt out from ircd::. 2016-09-23 00:01:00 -07:00
lgetopt.cc charybdis: Move getopt out from ircd::. 2016-09-23 00:01:00 -07:00
lgetopt.h charybdis: Move getopt out from ircd::. 2016-09-23 00:01:00 -07:00
Makefile.am Add support for libsodium (NaCl) cryptography. 2017-10-03 04:27:10 -07:00
README.md Update various documentation and comments. 2017-09-24 18:16:33 -07:00

Charybdis Server

Charybdis is the executable running libircd. This application provides an interface for the server administrator to start, stop, configure and locally communicate with the daemon. It sets up an asio::io_service which is passed to libircd, then it sets up signal handling, and then it runs the ios event loop until commanded to exit.

This program executes in the foreground. It does not "daemonize" anymore with a fork() etc. You are free to use your shell to execute or move the program to the background, or simply use a tmux or screen. Charybdis will output the libircd log to stdout and stderr by default.

Signals

Charybdis handles certain POSIX signals and their behavior is documented below. Signals are only handled here in the Charybdis executable; libircd itself does not use any signal logic (that we know about).

  • Signal handling is accomplished through boost::asio's mechanism which installs a handler to intercept the signal's delivery and posts it to the event loop for execution at the next event slice. This is how signal safety is achieved. Furthermore, according to boost docs, when signals are used this way they can be compatible with windows environments.
SIGINT

A ctrl-c to Charybdis will bring up the command line console interface. It will not halt the daemon. Log messages will be suppressed while the console is waiting for input, but service is still continuing in the background.

SIGTSTP

A ctrl-z or "Terminal SToP" to Charybdis will bring up the command line console like with SIGINT except that the entire daemon will pause while waiting for console input. When paused, a second SIGTSTP will exhibit default behavior so your shell can offer its functionality here.

SIGHUP

A "HangUP" to Charybdis is only relevant to the command line console, and signals it to close like an EOF. The legacy functionality for reloading server configuration et al is moved to SIGUSR1.

SIGQUIT

A ctrl-\ to Charybdis will cleanly shut down the server. It will not generate a coredump.

SIGUSR1

This signal commands the server to reload and refresh various aspects of its configuration and running state.