From fc8b072860580c6cd84446b623c8c198ba2d0c8e Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Mon, 4 Aug 2025 12:26:19 +0200 Subject: [PATCH] refs #2563 log the logging-out user --- src/opengnsys/linux/OGAgentService.py | 4 +++- src/opengnsys/windows/OGAgentService.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/opengnsys/linux/OGAgentService.py b/src/opengnsys/linux/OGAgentService.py index c1962a0..d6601d6 100755 --- a/src/opengnsys/linux/OGAgentService.py +++ b/src/opengnsys/linux/OGAgentService.py @@ -74,10 +74,12 @@ class OGAgentSvc(Daemon, CommonService): while self.isAlive: client_died=False if os.path.exists ('/tmp/ogagentuser_died'): + with open ('/tmp/ogagentuser_died', 'rb') as fd: + u = fd.read() os.unlink ('/tmp/ogagentuser_died') client_died=True if client_died: - self.notifyLogout (b'') + self.notifyLogout (u) # In milliseconds, will break self.doWait(1000) diff --git a/src/opengnsys/windows/OGAgentService.py b/src/opengnsys/windows/OGAgentService.py index 7529b38..1ce3142 100644 --- a/src/opengnsys/windows/OGAgentService.py +++ b/src/opengnsys/windows/OGAgentService.py @@ -108,10 +108,12 @@ class OGAgentSvc(win32serviceutil.ServiceFramework, CommonService): while self.isAlive: client_died=False if os.path.exists ('/windows/temp/ogagentuser_died'): + with open ('/windows/temp/ogagentuser_died', 'rb') as fd: + u = fd.read() os.unlink ('/windows/temp/ogagentuser_died') client_died=True if client_died: - self.notifyLogout (b'') + self.notifyLogout (u) # Pumps & processes any waiting messages pythoncom.PumpWaitingMessages()