From df7d8e1dff2122a3e49cd69629645e84ffc38f74 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:25:54 -0400 Subject: [PATCH] kill wine processes when game exits --- lib/sc-launch.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sc-launch.sh b/lib/sc-launch.sh index db27205..9e8f8bd 100755 --- a/lib/sc-launch.sh +++ b/lib/sc-launch.sh @@ -12,7 +12,6 @@ ############################################################################################# # # If you do not wish to use the above .desktop files, then simply run this script from your terminal -# Running this script within your terminal or with the .desktop file helps prevent lingering background wine processes # Configure the environment # Add additional environment variables here as needed @@ -28,9 +27,14 @@ export radv_zero_vram="true" # Run optional prelaunch and postexit scripts ############################################# # To use, update the game install paths here, then create the scripts with your desired actions in them +# Replace the trap line below with the one provided here # # "$HOME/Games/star-citizen/sc-prelaunch.sh" -# trap "$HOME/Games/star-citizen/sc-postexit.sh" EXIT +# trap "wineserver -k; $HOME/Games/star-citizen/sc-postexit.sh" EXIT + +# Kill the wine prefix when this script exits +# This makes sure there will be no lingering background wine processes +trap "wineserver -k" EXIT ################# # Launch the game