From 2c29c76b591b36eb26316a30f93e59202874dbe2 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 10 Apr 2005 00:59:09 +0000 Subject: [PATCH] implicate '--sync' option; it is not possible to stop asynchronously send SIGINT to pid 1 instead of trying to determine initpid git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2013 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vserver.stop | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util-vserver/scripts/vserver.stop b/util-vserver/scripts/vserver.stop index 205da84..4100a9b 100644 --- a/util-vserver/scripts/vserver.stop +++ b/util-vserver/scripts/vserver.stop @@ -41,25 +41,26 @@ function cleanup sync_fifo= trap "cleanup" EXIT +OPTION_FORCE_SYNC=1 + set -e generateOptions "$VSERVER_DIR" set +e vshelper.doDestroy "$VSERVER_DIR" "$S_CONTEXT" initSync "$VSERVER_DIR" sync_fifo -prepareStop "$VSERVER_DIR" +prepareStop "$VSERVER_DIR" cd "$VSERVER_DIR"/vdir/ -execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-stop +execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-stop cd "$VSERVER_DIR"/vdir/ test -z "$OPTION_DEFAULTTTY" || setDefaultTTY "$VSERVER_DIR" fail= if test -n "$_IS_FAKEINIT" && \ - $_VSERVER_INFO - FEATURE vkill && \ - initpid=$($_VSERVER_INFO "$S_CONTEXT" INITPID 2>/dev/null); then - $_VKILL -s INT --xid "$S_CONTEXT" -- 1 "$initpid" || fail=1 + $_VSERVER_INFO - FEATURE vkill; then + $_VKILL -s INT --xid "$S_CONTEXT" -- 1 || fail=1 ## HACK: remove the 'initpid' stuff above when PID virtualization ## is implemented elif $_VSERVER_INFO - FEATURE migrate; then -- 1.8.1.5