From: Christian Brauner Date: Sat, 25 Aug 2018 05:01:26 +0000 (+0200) Subject: commands: ensure -1 is sent on EPIPE for init pid X-Git-Tag: lxc-3.1.0~128^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2576%2Fhead;p=thirdparty%2Flxc.git commands: ensure -1 is sent on EPIPE for init pid Signed-off-by: Christian Brauner Reported-by: Stéphane Graber --- 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);