Libvirt ships several daemons (libvirtd, virtlogd, virtlockd) that all have similar code around general daemon startup. Right now the code is duplicated for each daemon, but it could be shared, like in a new file src/util/virdaemon.c. Rafael Fonseca (4): util: introduce shared daemon startup code locking: use shared daemon startup code logging: use shared daemon startup code remote: use shared daemon startup code src/libvirt_private.syms | 6 + src/locking/lock_daemon.c | 251 ++++------------------------------- src/logging/log_daemon.c | 239 ++++----------------------------- src/remote/remote_daemon.c | 263 +++---------------------------------- src/util/Makefile.inc.am | 2 + src/util/virdaemon.c | 255 +++++++++++++++++++++++++++++++++++ src/util/virdaemon.h | 74 +++++++++++ 7 files changed, 410 insertions(+), 680 deletions(-) create mode 100644 src/util/virdaemon.c create mode 100644 src/util/virdaemon.h -- 2.25.1