summaryrefslogtreecommitdiff
path: root/backend/decky_loader
diff options
context:
space:
mode:
Diffstat (limited to 'backend/decky_loader')
-rw-r--r--backend/decky_loader/main.py7
-rw-r--r--backend/decky_loader/plugin/sandboxed_plugin.py4
2 files changed, 9 insertions, 2 deletions
diff --git a/backend/decky_loader/main.py b/backend/decky_loader/main.py
index a9b78026..a6a61cef 100644
--- a/backend/decky_loader/main.py
+++ b/backend/decky_loader/main.py
@@ -19,6 +19,7 @@ import aiohttp_cors # pyright: ignore [reportMissingTypeStubs]
from aiohttp import client_exceptions
from aiohttp.web import Application, Response, Request, get, run_app, static # pyright: ignore [reportUnknownVariableType]
from aiohttp_jinja2 import setup as jinja_setup
+from setproctitle import getproctitle, setproctitle, setthreadtitle
# local modules
from .browser import PluginBrowser
@@ -216,6 +217,8 @@ class PluginManager:
run_app(self.web_app, host=get_server_host(), port=get_server_port(), loop=self.loop, access_log=None, handle_signals=False, shutdown_timeout=15)
def main():
+ setproctitle(f"Decky Loader {get_loader_version()} ({getproctitle()})")
+ setthreadtitle("Decky Loader")
if ON_WINDOWS:
# Fix windows/flask not recognising that .js means 'application/javascript'
import mimetypes
@@ -224,8 +227,8 @@ def main():
# Required for multiprocessing support in frozen files
multiprocessing.freeze_support()
else:
- if get_effective_user_id() != 0:
- logger.warning(f"decky is running as an unprivileged user, this is not officially supported and may cause issues")
+ if get_effective_user_id() != 0:
+ logger.warning(f"decky is running as an unprivileged user, this is not officially supported and may cause issues")
# Append the system and user python paths
sys.path.extend(get_system_pythonpaths())
diff --git a/backend/decky_loader/plugin/sandboxed_plugin.py b/backend/decky_loader/plugin/sandboxed_plugin.py
index 083a6749..07b04e7d 100644
--- a/backend/decky_loader/plugin/sandboxed_plugin.py
+++ b/backend/decky_loader/plugin/sandboxed_plugin.py
@@ -7,6 +7,7 @@ from sys import exit, path as syspath, modules as sysmodules
from traceback import format_exc
from asyncio import (get_event_loop, new_event_loop,
set_event_loop, sleep)
+from setproctitle import setproctitle, setthreadtitle
from .messages import SocketResponseDict, SocketMessageType
from ..localplatform.localsocket import LocalSocket
@@ -48,6 +49,9 @@ class SandboxedPlugin:
signal(SIGINT, SIG_IGN)
signal(SIGTERM, SIG_IGN)
+ setproctitle(f"{self.name} ({self.file})")
+ setthreadtitle(self.name)
+
set_event_loop(new_event_loop())
if self.passive:
return