[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 0.0.36.1-10-gb69db12
X2Go dev team
git-admin at x2go.org
Tue Jan 7 16:16:34 CET 2014
The branch, release/0.4.0.x has been updated
via b69db1263fb8876b4598f8e8e3807572e7fcae9c (commit)
via a6d746203239ffd58f4d86de4085c03b5e3ba4e4 (commit)
from 5e21f99c3d71e85481486cfbbb035d2f80934a19 (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/pulseaudio.py | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
The diff of changes is:
diff --git a/x2go/pulseaudio.py b/x2go/pulseaudio.py
index 34d491b..5a4a94d 100644
--- a/x2go/pulseaudio.py
+++ b/x2go/pulseaudio.py
@@ -25,6 +25,7 @@ __NAME__ = 'x2gopulseaudio-pylib'
from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
if _X2GOCLIENT_OS == 'Windows':
import wmi
+ import win32api
# modules
import os
@@ -72,10 +73,7 @@ class X2goPulseAudio(threading.Thread):
"""
self._keepalive = True
cmd = 'pulseaudio.exe'
- if self.path:
- cmd = os.path.join(self.path, cmd)
cmd_options = [
- '-D',
'-n',
'-L module-native-protocol-tcp port=4713',
'-L module-esound-protocol-tcp port=16001',
@@ -92,6 +90,7 @@ class X2goPulseAudio(threading.Thread):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=_shell,
+ cwd=self.path,
)
gevent.sleep(5)
_is_alive = p and (p.poll() is None)
@@ -108,12 +107,12 @@ class X2goPulseAudio(threading.Thread):
self.client_instance.HOOK_pulseaudio_server_died()
self.logger('terminating running PulseAudio server', loglevel=log.loglevel_DEBUG)
- p = subprocess.Popen(['pulseaudio', '-k', ],
- stdin=_stdin,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
- shell=_shell,
- )
+
+ # there is no real kill command on Windows...
+ PROCESS_TERMINATE = 1
+ p_handle = win32api.OpenProcess(PROCESS_TERMINATE, False, p.pid)
+ win32api.TerminateProcess(p_handle, 0)
+ win32api.CloseHandle(p_handle)
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