[lxc-devel] [lxc/master] lxccontainer: poll takes millisecond not seconds

brauner on Github lxc-bot at linuxcontainers.org
Thu Apr 2 16:21:08 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200402/f93a5317/attachment.bin>
-------------- next part --------------
From 908c75d24f7ab4d12a4591e50f2907c20c74a578 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Thu, 2 Apr 2020 18:19:31 +0200
Subject: [PATCH] lxccontainer: poll takes millisecond not seconds

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

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 38439b80b5..487d83894d 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -2131,7 +2131,7 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout)
 			 */
 
 			if (timeout != 0) {
-				ret = poll(&pidfd_poll, 1, timeout);
+				ret = poll(&pidfd_poll, 1, timeout * 1000);
 				if (ret < 0 || !(pidfd_poll.revents & POLLIN))
 					return false;
 


More information about the lxc-devel mailing list