Commit db2930e1 by Serge Hallyn

decide whether daemonize implies close_all_fds at start

This isn't the perfect fix. In fact close_all_fds shouldn't be stored in the lxc_conf. But this will fix the tests short-term. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent a2739df5
......@@ -466,9 +466,6 @@ static bool lxcapi_want_daemonize(struct lxc_container *c, bool state)
return false;
}
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;
}
......@@ -609,6 +606,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv
* while container is running...
*/
if (daemonize) {
conf->close_all_fds = 1;
lxc_monitord_spawn(c->config_path);
pid_t pid = fork();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment