return ret;
}
-static void do_set_daemonize(struct lxc_container *c, bool state)
-{
- c->daemonize = state;
- /* daemonize implies close_all_fds so set it */
- if (state)
- c->lxc_conf->close_all_fds = 1;
-}
-
static bool lxcapi_want_daemonize(struct lxc_container *c, bool state)
{
if (!c || !c->lxc_conf)
ERROR("Error getting mem lock");
return false;
}
- do_set_daemonize(c, state);
+ c->daemonize = state;
+ /* daemonize implies close_all_fds so set it */
+ if (state == 1)
+ c->lxc_conf->close_all_fds = 1;
container_mem_unlock(c);
return true;
}
container_destroy(c);
lxcapi_clear_config(c);
}
- if (!c->lxc_conf)
- c->lxc_conf = lxc_conf_init();
- do_set_daemonize(c, true);
+ c->daemonize = true;
c->pidfile = NULL;
// assign the member functions