From 6f817653f0e25fac2d4bf2ce955f6ae51790602a Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 10 Apr 2005 01:00:42 +0000 Subject: [PATCH] * kill vserver processes explicitly with 'killContext'; userspace reboot helper may assume that 'reboot(2)' never returns... * added 'async' method git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2014 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vshelper | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util-vserver/scripts/vshelper b/util-vserver/scripts/vshelper index 7fd7059..2bd6ed1 100755 --- a/util-vserver/scripts/vshelper +++ b/util-vserver/scripts/vshelper @@ -54,10 +54,12 @@ function doInternalMethod case "$ACTION" in (restart) logging $"Restarting vserver '$VSERVER'" + spawn killContext "$XID" execute $_VSERVER --defaulttty "$VSERVER" restart ;; (halt|poweroff) logging $"Stopping vserver '$VSERVER'" + spawn killContext "$XID" execute $_VSERVER --defaulttty "$VSERVER" stop ;; (swsusp) @@ -70,6 +72,10 @@ function doInternalMethod exit 1 esac ;; + + (async) + spawn killContext "$XID" + ;; (sync) local f=${METHOD_ARGS[0]} @@ -79,6 +85,7 @@ function doInternalMethod test -p "$f" || panic $"File '$f' which is required for synchronisation of vserver '$VSERVER' is not a pipe" + spawn killContext "$XID" echo "$ACTION" >"$f" ;; -- 1.8.1.5