sd_notifications ? "enabled" : "disabled");
}
-/*******************************************************************
- Close the low 3 fd's and open dev/null in their place.
-********************************************************************/
-
-void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too)
-{
-
- if (stdin_too) {
- int ret = close_low_fd(0);
- if (ret != 0) {
- DBG_ERR("close_low_fd(0) failed: %s\n", strerror(ret));
- }
- }
- if (stdout_too) {
- int ret = close_low_fd(1);
- if (ret != 0) {
- DBG_ERR("close_low_fd(1) failed: %s\n", strerror(ret));
- }
- }
- if (stderr_too) {
- int ret = close_low_fd(2);
- if (ret != 0) {
- DBG_ERR("close_low_fd(2) failed: %s\n", strerror(ret));
- }
- }
-}
-
/****************************************************************************
Become a daemon, discarding the controlling terminal.
****************************************************************************/
* @brief Utilities for demonising
*/
-/**
- * @brief Close the low 3 file descriptors and open /dev/null in their place
- *
- * @param[in] stdin_too Should stdin be closed?
- * @param[in] stdout_too Should stdout be closed?
- * @param[in] stderr_too Should stderr be closed?
-**/
-void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too);
-
/**
* @brief Enable or disable daemon status systemd notifications
*