From 508ed2ce6f746a9e9a16d9655672f0ca4b32d57e Mon Sep 17 00:00:00 2001 From: Utkarsh Ayachit Date: Mon, 31 Jul 2023 12:51:59 -0400 Subject: [PATCH] vnc: run websockify as background process Instead of running as a daemon, making websockify run as a background process. This ensures that the process gets cleaned up property if and when job is terminated. With certain job schedulers/environments (e.g. OpenPBS+AzHOP), this avoids dangling processes lingering post job termination. --- lib/ood_core/batch_connect/templates/vnc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ood_core/batch_connect/templates/vnc.rb b/lib/ood_core/batch_connect/templates/vnc.rb index 9049b4b4a..e61e5b9c9 100644 --- a/lib/ood_core/batch_connect/templates/vnc.rb +++ b/lib/ood_core/batch_connect/templates/vnc.rb @@ -138,7 +138,7 @@ def after_script echo "Starting websocket server..." websocket=$(find_port) [ $? -eq 0 ] || clean_up 1 # give up if port not found - #{websockify_cmd} -D ${websocket} localhost:${port} + #{websockify_cmd} ${websocket} localhost:${port} & # Set up background process that scans the log file for successful # connections by users, and change the password after every