[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 master
in repository x2goserver.

commit 92722bf87cab0dd9970d27a11d23be217ea9fc07
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).
    
    Conflicts (resolved by Mike Gabriel):
    	x2goserver/bin/x2golistdesktops
---
 debian/changelog                |    2 ++
 x2goserver/bin/x2golistdesktops |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fa793a5..6e2e971 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -174,6 +174,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 0a23ca2..058ede8 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -48,7 +48,7 @@ if( ! $serv)
 }
 
 # FIXME: finally get rid of this non-critical backtick expression
-my $rsess=`x2golistsessions $serv |grep _stR`;
+my $rsess=`timeout 1s x2golistsessions x2goserver |grep _stR`;
 my @rsess=split("\n","$rsess");
 my @rdisplays;
 for (my $i=0;$i<@rsess;$i++)
@@ -77,7 +77,7 @@ for(my $i=0;$i<@outp;$i++)
 	{
 		if ( grep { $_ eq "$uname\@$display" } @displays ) {
 		} else {
-			my $inf=system_capture_stdout_output("xwininfo", "-root", "-display", "$display");
+			my $inf=system_capture_stdout_output("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