From e8cd1208869322472467311ef4ccc4a236124a5a Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 25 Aug 2018 07:01:26 +0200 Subject: [PATCH] commands: ensure -1 is sent on EPIPE for init pid MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Brauner Reported-by: Stéphane Graber --- src/lxc/commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 63a8949a6..5aad2432d 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -376,7 +376,12 @@ pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath) { int ret, stopped; struct lxc_cmd_rr cmd = { - .req = { .cmd = LXC_CMD_GET_INIT_PID }, + .req = { + .cmd = LXC_CMD_GET_INIT_PID + }, + .rsp = { + .data = INT_TO_PTR((int){-1}) + } }; ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); -- 2.47.2