implicate '--sync' option; it is not possible to stop asynchronously
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 10 Apr 2005 00:59:09 +0000 (00:59 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 10 Apr 2005 00:59:09 +0000 (00:59 +0000)
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

index 205da84..4100a9b 100644 (file)
@@ -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