[X2Go-Commits] x2goserver.git - release/4.0.0.x (branch) updated: 4.0.0.2-22-g23bbab3
X2Go dev team
git-admin at x2go.org
Thu Jun 6 13:33:14 CEST 2013
The branch, release/4.0.0.x has been updated
via 23bbab3585b44d728146393f8c1b03d9d8908453 (commit)
from ab4d1afa5aa7a43024c597b04001d974442a4aee (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 -----------------------------------------------------------------
commit 23bbab3585b44d728146393f8c1b03d9d8908453
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu Jun 6 13:28:57 2013 +0200
Revert "Send SIGKILL to blocked X-Server (x2goagent) processes, if they do not disappear within 20secs. (Fixes: #32)."
This reverts commit afeeb580215270c4a1658b6773c8cb2ff6d4e2ed.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 2 --
x2goserver/lib/x2golistsessions_sql | 16 +---------------
x2goserver/sbin/x2gocleansessions | 29 ++---------------------------
3 files changed, 3 insertions(+), 44 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 64f8ff5..cadd8be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,6 @@ x2goserver (4.0.0.3-0~x2go1) UNRELEASED; urgency=low
in the session DB.
- Add support for terminating sessions via the session DB.
- Raise the frequency of the x2gocleansessions loop to every two seconds.
- - Send SIGKILL to blocked X-Server (x2goagent) processes, if they do not
- disappear within 20secs. (Fixes: #32).
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Sun, 19 May 2013 15:02:53 +0200
diff --git a/x2goserver/lib/x2golistsessions_sql b/x2goserver/lib/x2golistsessions_sql
index b667b4f..2957437 100755
--- a/x2goserver/lib/x2golistsessions_sql
+++ b/x2goserver/lib/x2golistsessions_sql
@@ -31,20 +31,6 @@ openlog($0,'cons,pid','user');
setlogmask( LOG_UPTO(x2gologlevel()) );
-sub check_pid
-{
- my $pid=shift;
- my $sess=shift;
- open (F,"</proc/$pid/cmdline") or return 0;
- my $text=<F>;
- close (F);
- if ($text =~ m/$sess/)
- {
- return 1;
- }
- return 0;
-}
-
my $serv=shift;
my @array;
if($serv eq "--all-servers")
@@ -59,7 +45,7 @@ my $i;
for ( $i=0;$i<@array;$i++)
{
my @ln=split('\|', at array[$i]);
- if ((@ln[4] eq "F") && (check_pid(@ln[0], @ln[1]))
+ if (@ln[4] eq "F")
{
my $sid = @ln[1];
dbsys_rmsessionsroot($sid);
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index 1548e2b..ca4f95a 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -118,43 +118,18 @@ elsif ($pid == 0 )
$SIG{TERM}=\&catch_term;
$SIG{CHLD} = sub { wait };
- my %blocked_sessions = ();
-
while(sleep 2)
{
my $outp=`$x2go_lib_path/x2golistsessions_sql $serv 2>/dev/null`;
my @outp=split("\n","$outp");
-
- # forget earlier remembered blocked sessions
- while ( my ($session, $blocked_time) = each(%blocked_sessions) ) {
- if (! join(',', @outp)=~m/$session/)
- {
- delete $blocked_sessions{$session}
- }
- }
-
for (my $i=0;$i<@outp;$i++)
{
my @sinfo=split('\\|',"@outp[$i]");
if (@sinfo[4]eq 'F')
{
-
syslog('debug', "@sinfo[1] is blocked");
- if defined $hash{ $key }
- {
- $blocked_sessions{@sinfo[1]} += 2;
- if ($blocked_sessions{@sinfo[1]} >= 20) {
- {
- # send SIGKILL to dangling X-server processes
- syslog('warning', "@sinfo[1]: found stale X-server process (@sinfo[0]), sending SIGKILL");
- qw(kill -9 @sinfo[0])
- }
- } else {
- $blocked_sessions{@sinfo[1]} = 0;
- syslog('debug', "@sinfo[1]: unmounting all shares");
- system( "su @sinfo[11] -c \"export HOSTNAME && x2goumount-session @sinfo[1]\" 2> /dev/null");
- }
-
+ syslog('debug', "@sinfo[1]: unmounting all shares");
+ system( "su @sinfo[11] -c \"export HOSTNAME && x2goumount-session @sinfo[1]\" 2> /dev/null");
}
elsif (! check_pid (@sinfo[0], at sinfo[1], at sinfo[12]))
{
hooks/post-receive
--
x2goserver.git (X2Go Server)
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 "x2goserver.git" (X2Go Server).
More information about the x2go-commits
mailing list