From 16f4c03a80419c7740fd0b33c25c2fd374966867 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Wed, 7 Nov 2018 12:27:12 -0600 Subject: [PATCH] add timeout kill to lxc attach call to prevent resource limits from performing the kill --- lxc/execute | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lxc/execute b/lxc/execute index 019ed94..2006564 100755 --- a/lxc/execute +++ b/lxc/execute @@ -87,10 +87,11 @@ case "$lang" in esac # runner -lxc-attach -n piston -- \ - /bin/bash -c "\ - PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin \ - bash /exec/$bin $newinc $epoch 2>&1 | head -c 65536" +timeout -s KILL 10 \ + lxc-attach -n piston -- \ + /bin/bash -c "\ + PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin \ + bash /exec/$bin $newinc $epoch 2>&1 | head -c 65536" # process janitor lxc-attach -n piston -- \