summaryrefslogtreecommitdiffstats
path: root/core/modules/vmchooser2
diff options
context:
space:
mode:
authorSimon Rettberg2019-10-18 19:37:02 +0200
committerSimon Rettberg2019-10-18 19:37:02 +0200
commit51cef3364af88ae94cec52053dad5d77290dcb64 (patch)
treeb5e658963b81d5af0d4d6109c9a8c76de11020a2 /core/modules/vmchooser2
parent[idleaction] Stop logind from killing user processes on logout (diff)
downloadmltk-51cef3364af88ae94cec52053dad5d77290dcb64.tar.gz
mltk-51cef3364af88ae94cec52053dad5d77290dcb64.tar.xz
mltk-51cef3364af88ae94cec52053dad5d77290dcb64.zip
[vmchooser2] Add sessionstart delay of 1 second
This accounts for the fact that vmchooser now starts the sessionstart script before execv()ing the actual session. In case of a failed execv(), vmchooser has one second to kill this script before it actually does anything.
Diffstat (limited to 'core/modules/vmchooser2')
-rwxr-xr-xcore/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
index 1cc7eb5f..215077e3 100755
--- a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
+++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
@@ -1,5 +1,11 @@
#!/bin/ash
+# Give it some time, in case starting the session fails.
+# In that case, vmchooser will send us a SIGTERM, which will
+# hopefully happen within one second, so we wont't execute
+# all the sessionstart hooks.
+sleep 1
+
SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d"
if [ -d "$SOURCEPATH" ]; then