Skip to content

Commit

Permalink
Terminate the entire stack after app exits
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimiblock committed Feb 9, 2025
1 parent ca72276 commit 9a56beb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ function execApp() {
--setenv XDG_DATA_HOME "${XDG_DATA_HOME}" \
-- \
${launchTarget}
stopApp
}

function execAppExist() {
Expand Down Expand Up @@ -571,7 +572,7 @@ function warnMulRunning() {
zenity --title "Application is not responding" --icon=utilities-system-monitor-symbolic --default-cancel --question --text="Do you wish to terminate the running session?"
fi
if [ $? = 0 ]; then
systemctl --user stop "portable-${friendlyName}.slice"
stopApp
else
pecho crit "User denied session termination"
exit $?
Expand Down Expand Up @@ -849,6 +850,8 @@ function passPid() {
}

function stopApp() {
systemctl --user stop "${friendlyName}-dbus"
systemctl --user stop "${friendlyName}-dbus-a11y"
systemctl --user stop "portable-${friendlyName}.slice"
}

Expand Down

0 comments on commit 9a56beb

Please sign in to comment.