[X2Go-Commits] [x2goserver] 01/01: Silently timeout in x2golistdesktops if calls to x2golistsessions and/or xwininfo don't produce output within one second. (Fixes: #543).

git-admin at x2go.org git-admin at x2go.org
Fri Jul 11 13:39:32 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.

commit ce5bf882ff1e0cf9b603c25b7711c07f6a350ffc
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Jul 11 13:38:21 2014 +0200

    Silently timeout in x2golistdesktops if calls to x2golistsessions and/or xwininfo don't produce output within one second. (Fixes: #543).
---
 debian/changelog                |    2 ++
 x2goserver/bin/x2golistdesktops |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 350f67d..498a41a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,8 @@ x2goserver (4.0.1.16-0x2go1) UNRELEASED; urgency=low
     - Make x2goruncommand more robust.
     - Don't fail Xsession startup if any of the profile scripts returns
       with an error.
+    - Silently timeout in x2golistdesktops if calls to x2golistsessions and/or
+      xwininfo don't produce output within one second. (Fixes: #543).
   * debian/control, x2goserver.spec:
     + Update versioned D: x2goagent (>= 3.5.0.25). This assures that X2Go
       works with poly-instantiated /tmp directories.
diff --git a/x2goserver/bin/x2golistdesktops b/x2goserver/bin/x2golistdesktops
index 0d9f69e..7c7afa2 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -47,7 +47,7 @@ if( ! $serv)
 	$serv=hostname;
 }
 
-my $rsess=`x2golistsessions x2goserver |grep _stR`;
+my $rsess=`timeout 1s x2golistsessions x2goserver |grep _stR`;
 my @rsess=split("\n","$rsess");
 my @rdisplays;
 for (my $i=0;$i<@rsess;$i++)
@@ -76,7 +76,7 @@ for(my $i=0;$i<@outp;$i++)
 	{
 		if ( grep { $_ eq "$uname\@$display" } @displays ) {
 		} else {
-			my $inf=`xwininfo -root -display $display`;
+			my $inf=`timeout 1s xwininfo -root -display $display`;
 			if ( $inf=~ m/geometry/)
 			{
 				push (@displays, "$uname\@$display");

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list