]> git.proxmox.com Git - mirror_lxc.git/commitdiff
attach_options: add log_fd argument
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Jan 2018 11:27:05 +0000 (12:27 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Jan 2018 12:20:22 +0000 (13:20 +0100)
This will be used to log the output of attach to.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/attach_options.h

index 7055f7a1f4ff390417bc5bcc607745964b451588..fad6456ccc4bb79631b7515b2bb4c46b192de7f4 100644 (file)
@@ -131,6 +131,9 @@ typedef struct lxc_attach_options_t {
        int stdout_fd; /*!< stdout file descriptor */
        int stderr_fd; /*!< stderr file descriptor */
        /**@}*/
+
+       /*! File descriptor to log output. */
+       int log_fd;
 } lxc_attach_options_t;
 
 /*! Default attach options to use */
@@ -145,7 +148,10 @@ typedef struct lxc_attach_options_t {
                /* .env_policy = */     LXC_ATTACH_KEEP_ENV,                   \
                /* .extra_env_vars = */ NULL,                                  \
                /* .extra_keep_env = */ NULL,                                  \
-               /* .stdin_fd = */       0, 1, 2                                \
+               /* .stdin_fd = */       0,                                     \
+               /* .stdout_fd = */      1,                                     \
+               /* .stderr_fd = */      2,                                     \
+               /* .log_fd    = */      -EBADF,                                \
        }
 
 /*!