This is most noticeable when you do "end existing session". What happens is: - The client sends "kill session" to vsmmaster - vsmmaster sends "terminate session" to vsmagent - vsmagent sends SIGTERM to tl-session - tl-session sends SIGTERM to tl-xinit, then waits for it to terminate - tl-xinit sends SIGHUP to the client command (normally xsession) and all children, and SIGTERM/SIGKILL to Xvnc. - tl-xinit fiddles with the session directory and terminates Here there is a race between client programs to finish cleanup, and tl-xinit renaming the session directory and terminating. It also means we return success back to the client before everything has died. This can cause conflicts for programs that don't like multiple instances. It also makes the process tree slightly more confusing in the event that the client program refuses to terminate.
One noticeable effect of this is stray local drives as it will look for mount points in e.g. /var/opt/thinlinc/sessions/user/1/drives not: /var/opt/thinlinc/sessions/user/1.ended/drives
The fix for bug #5696 includes changes at this area of how client process is shutdown is handled. It does no wait for client and if timeout is reached the client process will receive a KILL signal. This change was made in commit r31686 which will solve this bug.
Works well. Verified by adding a script with a delay of 5 seconds to xlogout.d. With 4.6.0 we get a race and stray mounts, whilst the nightly build properly cleans up.