summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/gsyncd.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-17 04:45:59 +0000
committerAnand Avati <avati@gluster.com>2011-04-17 07:39:15 -0700
commit666e43aca607c90d95379caa13b42a4ed976e8a7 (patch)
tree1494fadb12dcd4e4db1a977b72cc4e56ee8b9355 /xlators/features/marker/utils/syncdaemon/gsyncd.py
parent856a7ee345713b66ccb6eba6fca276273807fe30 (diff)
syncdaemon: minor cleanups on termination
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> 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
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/gsyncd.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/gsyncd.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py
index ba4d7a6dd..27c91858e 100644
--- a/xlators/features/marker/utils/syncdaemon/gsyncd.py
+++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py
@@ -94,7 +94,7 @@ def startup(**kw):
GLogger.setup(label=kw.get('label'), **lkw)
def main():
- signal.signal(signal.SIGTERM, lambda *a: (finalize(*a), os._exit(1)))
+ signal.signal(signal.SIGTERM, lambda *a: finalize(*a, **{'exval': 1}))
GLogger.setup()
excont = FreeObject(exval = 0)
try:
@@ -103,9 +103,7 @@ def main():
except:
log_raise_exception(excont)
finally:
- finalize()
- # force exit in non-main thread too
- os._exit(excont.exval)
+ finalize(excont.exval)
def main_i():
rconf = {'go_daemon': 'should'}