Skip to content

Instantly share code, notes, and snippets.

/*
* This is an example Linux daemon that communicates via dbus.
* When run, it will daemonize and print to standard output two lines:
*
* 1. The PID of the daemon process, which can be used to kill it later with `kill -s SIGINT <pid>'
* 2. The unique D-Bus address it will be listening to
*/
#include <signal.h>
#include <stdio.h>