This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 1a0fc87a x2goserver/sbin/x2gocleansessions: rework comment explaining what a session without an agent PID entry actually means and use the value from x2gocleansessions.agent-startup-time (if valid) instead of a hardcoded value. new c2182644 x2goserver/sbin/x2gocleansessions: replace time check with PID validity check in check_pid and calls. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 6 ++++++ x2goserver/sbin/x2gocleansessions | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit c2182644e53b5038911f13f994c574298dec3f1c Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Feb 28 16:33:26 2020 +0100 x2goserver/sbin/x2gocleansessions: replace time check with PID validity check in check_pid and calls. The time check was really just a workaround to allow the agent to start up after a session was formally created, but we already have such a check in another place. Instead, treat a missing PID, which can only happen during session startup, as a success. --- debian/changelog | 6 ++++++ x2goserver/sbin/x2gocleansessions | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 79d7de01..3e27a07a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -178,6 +178,12 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium session without an agent PID entry actually means and use the value from x2gocleansessions.agent-startup-time (if valid) instead of a hardcoded value. + - x2goserver/sbin/x2gocleansessions: replace time check with PID validity + check in check_pid and calls. The time check was really just a + workaround to allow the agent to start up after a session was formally + created, but we already have such a check in another place. Instead, + treat a missing PID, which can only happen during session startup, as a + success. * debian/control: + Build-depend upon lsb-release for distro version detection. * debian/x2goserver.manpages: diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 686a3f4e..68ed9ef4 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -61,8 +61,7 @@ sub check_pid { my $pid=shift; my $sess=shift; - my $sec=shift; - if ($sec < 30) + if (!$pid) { return 1; } @@ -252,7 +251,7 @@ elsif ($pid == 0 ) if (@sinfo[4] eq 'F') { - if (!check_pid (@sinfo[0], @sinfo[1], 100)) { + if (!check_pid (@sinfo[0], @sinfo[1])) { # No clean up necessary, as the agent is dead. # Removing sockets again would only lead to potentially # overwriting the socket another session claimed in-between. @@ -304,7 +303,7 @@ elsif ($pid == 0 ) system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]"); } } - elsif (! check_pid (@sinfo[0],@sinfo[1],@sinfo[12])) + elsif (! check_pid (@sinfo[0],@sinfo[1])) { $user = @sinfo[11]; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git