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 0174a5202742636f020f01df0c9c04f95980bdbb Author: Horst Schirmeier <horst@schirmeier.com> Date: Mon Oct 6 22:17:25 2014 +0200 Remove stale X11 lock files in cases where x2goagent mysteriously disappeared (e.g., due to kill -9 or a crash). (Fixes: #630). --- debian/changelog | 5 ++++- x2goserver/sbin/x2gocleansessions | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 64683f4..3504855 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ x2goserver (4.0.1.18-0x2go1) UNRELEASED; urgency=medium - * Continue development... + [ Horst Schirmeier ] + * New upstream release (4.0.1.18): + - Remove stale X11 lock files in cases where x2goagent mysteriously + disappeared (e.g., due to kill -9 or a crash). (Fixes: #630). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Mon, 06 Oct 2014 22:13:22 +0200 diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 59afe91..e576e60 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -206,6 +206,11 @@ elsif ($pid == 0 ) syslog('warning', "@sinfo[1], pid @sinfo[0] cleaning up stale X11 socket file: /tmp/.X11-unix/X$display"); unlink("/tmp/.X11-unix/X$display"); } + if (-e "/tmp/.X$display-lock") { + # remove the NX-X11 lock file (as the agent will not have managed after a kill -9) + syslog('warning', "@sinfo[1], pid @sinfo[0] cleaning up stale X11 lock file: /tmp/.X$display-lock"); + unlink("/tmp/.X$display-lock"); + } syslog('debug', "@sinfo[1]: unmounting all shares"); system( "su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); } @@ -219,7 +224,12 @@ elsif ($pid == 0 ) syslog('warning', "@sinfo[1], pid @sinfo[0] cleaning up stale X11 socket file: /tmp/.X11-unix/X$display"); unlink("/tmp/.X11-unix/X$display"); } - syslog('debug', "@sinfo[1], pid @sinfo[0] does not exist, changing status from @sinfo[4] to F"); + if (-e "/tmp/.X$display-lock") { + # remove the NX-X11 lock file (we don't know how the agent disappeared, + # someone might have shot it with kill -9) + syslog('warning', "@sinfo[1], pid @sinfo[0] cleaning up stale X11 lock file: /tmp/.X$display-lock"); + unlink("/tmp/.X$display-lock"); + } syslog('debug', "@sinfo[1], pid @sinfo[0] does not exist, changing status from @sinfo[4] to F"); syslog('debug', "@sinfo[1]: unmounting all shares"); system("su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); } -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git