[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.0.39.0-81-g16d6079
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:30:08 CET 2014
The branch, build-baikal has been updated
via 16d6079efb0c1090f73266fe58b0ed6ef6e74958 (commit)
from b78559c3ad69d76eb7352cbd1132c6937b6f491e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2go/xserver.py | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
The diff of changes is:
diff --git a/x2go/xserver.py b/x2go/xserver.py
index 815acf3..76bba0e 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -28,10 +28,10 @@ __NAME__ = 'x2goxserver-pylib'
from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
if _X2GOCLIENT_OS == 'Windows':
import wmi
+ import win32process
# modules
import os
-import subprocess
import threading
import gevent
import copy
@@ -191,18 +191,31 @@ class X2goXServer(threading.Thread):
cmd_line = [self.xserver_config['run_command']]
cmd_line.extend(self.xserver_config['parameters'])
self.logger('starting XServer ,,%s\'\' with command line: %s' % (self.xserver_name, ' '.join(cmd_line)), loglevel=log.loglevel_DEBUG)
- p = subprocess.Popen(cmd_line,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
- shell=False,
- )
+
+ if _X2GOCLIENT_OS == 'Windows':
+ si = win32process.STARTUPINFO()
+ p_info = win32process.CreateProcess(None,
+ ' '.join(cmd_line),
+ None,
+ None,
+ 0,
+ win32process.NORMAL_PRIORITY_CLASS,
+ None,
+ None,
+ si,
+ )
+ (hProcess, hThread, processId, threadId) = p_info
+
while self._keepalive:
gevent.sleep(1)
+
self.logger('terminating running XServer ,,%s\'\'' % self.xserver_name, loglevel=log.loglevel_DEBUG)
- try:
- p.terminate()
- except WindowsError:
- pass
+
+ if _X2GOCLIENT_OS == 'Windows':
+ try:
+ win32process.TerminateProcess(hProcess, 0)
+ except win32process.error:
+ pass
def stop_thread(self):
"""\
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list