[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-132-gfc425ca
X2Go dev team
git-admin at x2go.org
Fri Dec 20 12:17:30 CET 2013
The branch, master has been updated
via fc425cac66ea58ae30505ce5a9bb1cf89feab548 (commit)
from 3c1a4bfbaebfc929632660673dc021b8e9a4f244 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fc425cac66ea58ae30505ce5a9bb1cf89feab548
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Dec 20 12:17:27 2013 +0100
x2gobroker-authservice: use atexit rather than signal to clean up socket file when authservice terminates
-----------------------------------------------------------------------
Summary of changes:
sbin/x2gobroker-authservice | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
The diff of changes is:
diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice
index 39bfe4f..574e41e 100755
--- a/sbin/x2gobroker-authservice
+++ b/sbin/x2gobroker-authservice
@@ -31,7 +31,7 @@ import socket
import getpass
import logging.config
import pam
-import signal
+import atexit
if os.path.isdir('/run'):
RUNDIR = '/run'
@@ -106,9 +106,8 @@ def loop():
asyncore.loop()
-def sigterm_handler():
- try: os.remove(X2GOBROKER_AUTHSERVICE_SOCKET)
- except: pass
+def cleanup_socketfile():
+ os.remove(X2GOBROKER_AUTHSERVICE_SOCKET)
# normally this would go into defaults.py, however, we do not want to pull in defaults.py here as that will create
@@ -232,8 +231,8 @@ if __name__ == '__main__':
daemon_logdir += '/'
socket_file = cmdline_args.socket_file
- signal.signal(signal.SIGTERM, sigterm_handler)
AuthService(socket_file, owner=cmdline_args.owner, group_owner=cmdline_args.group, permissions=cmdline_args.permissions)
+ atexit.register(cleanup_socketfile)
try:
if CAN_DAEMONIZE and cmdline_args.daemonize:
keep_fds = [int(fd) for fd in os.listdir('/proc/self/fd') if fd not in (0,1,2) ]
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list