diff options
| author | AAGaming <aagaming@riseup.net> | 2024-02-14 17:49:52 -0500 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-02-14 17:49:52 -0500 |
| commit | ee6122b97d042e8bb50531511d6c0103e0d6a358 (patch) | |
| tree | ae3a17884c5aa2b8389ba77c8c09cd645c28635d /backend/decky_loader/localplatform | |
| parent | 091428f683ba5bf3f9960b6c54cf424d834b3365 (diff) | |
| download | decky-loader-ee6122b97d042e8bb50531511d6c0103e0d6a358.tar.gz decky-loader-ee6122b97d042e8bb50531511d6c0103e0d6a358.zip | |
restart ui by killing webhelper
this cleanly reloads the ui, prevents memory leaks, and won't break the toasts
Diffstat (limited to 'backend/decky_loader/localplatform')
| -rw-r--r-- | backend/decky_loader/localplatform/localplatformlinux.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/decky_loader/localplatform/localplatformlinux.py b/backend/decky_loader/localplatform/localplatformlinux.py index 68717bcf..4eb112ee 100644 --- a/backend/decky_loader/localplatform/localplatformlinux.py +++ b/backend/decky_loader/localplatform/localplatformlinux.py @@ -156,6 +156,10 @@ async def service_start(service_name : str) -> bool: res = run(cmd, stdout=PIPE, stderr=STDOUT) return res.returncode == 0 +async def restart_webhelper() -> bool: + res = run(["killall", "-s", "SIGTERM", "steamwebhelper"], stdout=DEVNULL, stderr=DEVNULL) + return res.returncode == 0 + def get_privileged_path() -> str: path = os.getenv("PRIVILEGED_PATH") |
