From e5c38128fa76b3e11047d49448aab77d3a551804 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 13 Apr 2011 01:46:05 +0000 Subject: syncdaemon: force termination for unhandled exception in any thread Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2736 (gsyncd hangs if crash occurs in the non-main thread) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2736 --- xlators/features/marker/utils/syncdaemon/repce.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features/marker/utils/syncdaemon/repce.py') diff --git a/xlators/features/marker/utils/syncdaemon/repce.py b/xlators/features/marker/utils/syncdaemon/repce.py index 8b7e0ae94..47691301e 100644 --- a/xlators/features/marker/utils/syncdaemon/repce.py +++ b/xlators/features/marker/utils/syncdaemon/repce.py @@ -3,7 +3,7 @@ import sys import select import time import logging -from threading import Thread, Condition +from threading import Condition try: import thread except ImportError: @@ -20,6 +20,8 @@ except ImportError: # py 3 import pickle +from syncdutils import Thread + pickle_proto = -1 repce_version = 1.0 @@ -51,7 +53,6 @@ class RepceServer(object): def service_loop(self): for i in range(self.wnum): t = Thread(target=self.worker) - t.setDaemon(True) t.start() try: while True: @@ -109,7 +110,6 @@ class RepceClient(object): self.inf, self.out = ioparse(i, o) self.jtab = {} t = Thread(target = self.listen) - t.setDaemon(True) t.start() def listen(self): -- cgit