]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: s/backgrounded/daemonize/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 21 Sep 2018 10:24:24 +0000 (12:24 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 21 Sep 2018 10:52:32 +0000 (12:52 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/execute.c
src/lxc/lxc.h
src/lxc/start.c
src/lxc/start.h

index dc23bb3ea71aafccd100767bebd6c30b1250b66d..163f3f4731000ac4f976f8f70cdd1ffd6f98a72a 100644 (file)
@@ -150,12 +150,12 @@ static struct lxc_operations execute_start_ops = {
 
 int lxc_execute(const char *name, char *const argv[], int quiet,
                struct lxc_handler *handler, const char *lxcpath,
-               bool backgrounded, int *error_num)
+               bool daemonize, int *error_num)
 {
        struct execute_args args = {.argv = argv, .quiet = quiet};
 
        TRACE("Doing lxc_execute");
        handler->conf->is_execute = true;
        return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath,
-                          backgrounded, error_num);
+                          daemonize, error_num);
 }
index c2a150cf4c184ccc11ec7fac76a0d5b04e8c08b2..237d74750c5503b7d16184eb3be7a0bdf3a21e6d 100644 (file)
@@ -49,12 +49,12 @@ struct lxc_handler;
  * @name         : the name of the container
  * @argv         : an array of char * corresponding to the commande line
  * @conf         : configuration
- * @backgrounded : whether or not the container is daemonized
+ * @daemonize    : whether or not the container is daemonized
  * Returns 0 on success, < 0 otherwise
  */
 extern int lxc_start(const char *name, char *const argv[],
                     struct lxc_handler *handler, const char *lxcpath,
-                    bool backgrounded, int *error_num);
+                    bool daemonize, int *error_num);
 
 /*
  * Start the specified command inside an application container
@@ -62,12 +62,12 @@ extern int lxc_start(const char *name, char *const argv[],
  * @argv         : an array of char * corresponding to the commande line
  * @quiet        : if != 0 then lxc-init won't produce any output
  * @conf         : configuration
- * @backgrounded : whether or not the container is daemonized
+ * @daemonize    : whether or not the container is daemonized
  * Returns 0 on success, < 0 otherwise
  */
 extern int lxc_execute(const char *name, char *const argv[], int quiet,
                       struct lxc_handler *handler, const char *lxcpath,
-                      bool backgrounded, int *error_num);
+                      bool daemonize, int *error_num);
 
 /*
  * Close the fd associated with the monitoring
index 8d3a7ced5951891a19faf1166e11332a0652648d..6d289dadd6e9751d68b51fc2785c757459460edc 100644 (file)
@@ -461,7 +461,7 @@ static int lxc_serve_state_socket_pair(const char *name,
 {
        ssize_t ret;
 
-       if (!handler->backgrounded ||
+       if (!handler->daemonize ||
             handler->state_socket_pair[1] < 0 ||
            state == STARTING)
                return 0;
@@ -1168,7 +1168,7 @@ static int do_start(void *data)
         * means that migration won't work, but at least we won't spew output
         * where it isn't wanted.
         */
-       if (handler->backgrounded && !handler->conf->autodev) {
+       if (handler->daemonize && !handler->conf->autodev) {
                ret = access(path, F_OK);
                if (ret != 0) {
                        devnull_fd = open_devnull();
@@ -1256,7 +1256,7 @@ static int do_start(void *data)
         * make sure that that pty is stdin,stdout,stderr.
         */
         if (handler->conf->console.slave >= 0) {
-                if (handler->backgrounded || !handler->conf->is_execute)
+                if (handler->daemonize || !handler->conf->is_execute)
                         ret = set_stdfds(handler->conf->console.slave);
                 else
                         ret = lxc_terminal_set_stdfds(handler->conf->console.slave);
@@ -1283,7 +1283,7 @@ static int do_start(void *data)
 
        close(handler->sigfd);
 
-       if (handler->conf->console.slave < 0 && handler->backgrounded) {
+       if (handler->conf->console.slave < 0 && handler->daemonize) {
                if (devnull_fd < 0) {
                        devnull_fd = open_devnull();
                        if (devnull_fd < 0)
@@ -1945,7 +1945,7 @@ out_sync_fini:
 
 int __lxc_start(const char *name, struct lxc_handler *handler,
                struct lxc_operations* ops, void *data, const char *lxcpath,
-               bool backgrounded, int *error_num)
+               bool daemonize, int *error_num)
 {
        int ret, status;
        struct lxc_conf *conf = handler->conf;
@@ -1957,7 +1957,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
        }
        handler->ops = ops;
        handler->data = data;
-       handler->backgrounded = backgrounded;
+       handler->daemonize = daemonize;
 
        if (!attach_block_device(handler->conf)) {
                ERROR("Failed to attach block device");
@@ -2093,14 +2093,14 @@ static struct lxc_operations start_ops = {
 };
 
 int lxc_start(const char *name, char *const argv[], struct lxc_handler *handler,
-             const char *lxcpath, bool backgrounded, int *error_num)
+             const char *lxcpath, bool daemonize, int *error_num)
 {
        struct start_args start_arg = {
                .argv = argv,
        };
 
        TRACE("Doing lxc_start");
-       return __lxc_start(name, handler, &start_ops, &start_arg, lxcpath, backgrounded, error_num);
+       return __lxc_start(name, handler, &start_ops, &start_arg, lxcpath, daemonize, error_num);
 }
 
 static void lxc_destroy_container_on_signal(struct lxc_handler *handler,
index aaa731077a7e41fc22396f75cd835989bb883599..bcb852e8ba5f3e91162ed6352c367d51ae228dff 100644 (file)
@@ -98,7 +98,7 @@ struct lxc_handler {
        bool am_root;
 
        /* Indicates whether should we close std{in,out,err} on start. */
-       bool backgrounded;
+       bool daemonize;
 
        /* The child's pid. */
        pid_t pid;