add handling of stdio descriptors
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 7 Jan 2022 10:07:19 +0000 (11:07 +0100)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Mon, 10 Jan 2022 15:20:57 +0000 (16:20 +0100)
commitf0dfba985e488a3d943b49911e2b3ecfd61e714e
tree3947949a6b34a22fd8cd89085c80c5c664aa4c93
parent478afd5eb545d5ae0ecbfc2c9f216111f559fefe
add handling of stdio descriptors

This completes the daemonization API by adding a function that
reassigns the stdio descriptors to /dev/null to prevent the
process from being tied IO wise to the terminal it was started
on.

A ``daemonize_full()`` helper combines all the daemonization
steps into a single call.
src/daemonfunc.cpp
src/daemonfunc.hpp