static void glue_daemonize_init(const struct options *options) { daemonize_init(config_get_string(CONF_USER, NULL), config_get_string(CONF_GROUP, NULL), config_get_path(CONF_PID_FILE)); if (options->kill) daemonize_kill(); }
static bool glue_daemonize_init(const struct options *options, GError **error_r) { GError *error = NULL; char *pid_file = config_dup_path(CONF_PID_FILE, &error); if (pid_file == NULL && error != NULL) { g_propagate_error(error_r, error); return false; } daemonize_init(config_get_string(CONF_USER, NULL), config_get_string(CONF_GROUP, NULL), pid_file); g_free(pid_file); if (options->kill) daemonize_kill(); return true; }