]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
return the result of the lxcapi_want_close_all_fds call to the caller
authorS.Çağlar Onur <caglar@10ur.org>
Sat, 21 Sep 2013 17:00:15 +0000 (13:00 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 23 Sep 2013 15:20:29 +0000 (10:20 -0500)
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c
src/lxc/lxccontainer.h

index 727c6809ee00a27fbffe2acb5575549067b9da54..5c49b8bfeb7a8cf767cfe358a5059d5f3e41428f 100644 (file)
@@ -456,16 +456,17 @@ static void lxcapi_want_daemonize(struct lxc_container *c)
        container_mem_unlock(c);
 }
 
-static void lxcapi_want_close_all_fds(struct lxc_container *c)
+static bool lxcapi_want_close_all_fds(struct lxc_container *c)
 {
        if (!c || !c->lxc_conf)
-               return;
+               return false;
        if (container_mem_lock(c)) {
                ERROR("Error getting mem lock");
-               return;
+               return false;
        }
        c->lxc_conf->close_all_fds = 1;
        container_mem_unlock(c);
+       return true;
 }
 
 static bool lxcapi_wait(struct lxc_container *c, const char *state, int timeout)
index 8b6c6ef2b61d3fb4ca51e8f154601d732112295a..225fb3995b63beb41f6ae0d44f53f3c49447c89a 100644 (file)
@@ -68,7 +68,7 @@ struct lxc_container {
        bool (*startl)(struct lxc_container *c, int useinit, ...);
        bool (*stop)(struct lxc_container *c);
        void (*want_daemonize)(struct lxc_container *c);
-       void (*want_close_all_fds)(struct lxc_container *c);
+       bool (*want_close_all_fds)(struct lxc_container *c);
        // Return current config file name.  The result is strdup()d, so free the result.
        char *(*config_file_name)(struct lxc_container *c);
        // for wait, timeout == -1 means wait forever, timeout == 0 means don't wait.