[lxc-devel] [lxc/master] lxccontainer: allow threaded in all cases

brauner on Github lxc-bot at linuxcontainers.org
Fri Sep 21 10:55:34 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 448 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180921/696a0e07/attachment.bin>
-------------- next part --------------
From 2ca64ecf7fe3495f3859d8e94647af322407035f Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 21 Sep 2018 12:53:53 +0200
Subject: [PATCH] lxccontainer: allow threaded in all cases

I don't see how threaded containers run in the foreground would pose a
problem.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/lxccontainer.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 30b181b8c..908d9868b 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1028,11 +1028,6 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a
 		ret = setsid();
 		if (ret < 0)
 			TRACE("Process %d is already process group leader", lxc_raw_getpid());
-	} else if (!am_single_threaded()) {
-		ERROR("Cannot start non-daemonized container when threaded");
-		free_init_cmd(init_cmd);
-		lxc_free_handler(handler);
-		return false;
 	}
 
 	/* We need to write PID file after daemonize, so we always write the


More information about the lxc-devel mailing list