[X2Go-Commits] [x2goserver] 01/15: x2goserver/bin/x2gostartagent: fetch the agent PID as early as possible.

git-admin at x2go.org git-admin at x2go.org
Thu Apr 15 11:15:01 CEST 2021


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

x2go pushed a commit to branch master
in repository x2goserver.

commit 1cd395ad72f64431a70ea4f98f27a0d0a0901934
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Jan 2 16:16:02 2021 +0100

    x2goserver/bin/x2gostartagent: fetch the agent PID as early as possible.
---
 debian/changelog              | 1 +
 x2goserver/bin/x2gostartagent | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 16966f97..2bd19876 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -382,6 +382,7 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
       x2gooptionsstring.
     - x2goserver/bin/x2gooptionsstring: rename x2goupdateoptionsstring to
       x2gooptionsstring.
+    - x2goserver/bin/x2gostartagent: fetch the agent PID as early as possible.
   * debian/control:
     + Build-depend upon lsb-release for distro version detection.
   * debian/x2goserver.manpages:
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index 887cb322..1c62b6ab 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -472,10 +472,10 @@ else
 	NX_TEMP='/tmp' "${AGENTBIN}" ${X2GO_NXAGENT_OPTIONS} ${NOLISTOPT} ${X2GODPIOPTION_} ${XDMCPOPT} -${SESSION_TYPE} ${NOEXITPARAM} -auth "${XAUTHORITY}" ${agent_geometry} -name "${SESSION_WINDOW_TITLE}" "${NX_AGENT}" 2>"${SESSION_LOG}" &
 fi
 
-ln -s -- "${SESSION_DIR}" "${X2GO_ROOT}/C-${SESSION_NAME}"
-
 X2GO_AGENT_PID="${!}"
 
+ln -s -- "${SESSION_DIR}" "${X2GO_ROOT}/C-${SESSION_NAME}"
+
 if [[ -n "${SHADREQ_USER}" ]]; then
 	"${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'info' "creating new shadow session: ${SESSION_NAME} ${X2GO_COOKIE} ${X2GO_AGENT_PID} ${X2GO_CLIENT} ${GR_PORT} ${SOUND_PORT} ${FS_PORT} ${SHADREQ_USER}"
 	"${X2GO_LIB_PATH}/x2gocreateshadowsession" "${SESSION_NAME}" "${X2GO_COOKIE}" "${X2GO_AGENT_PID}" "${X2GO_CLIENT}" "${GR_PORT}" "${SOUND_PORT}" "${FS_PORT}" "${SHADREQ_USER}" >'/dev/null'

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list