From 67f842aa406a05fd701f9dbdcd373516fa529087 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 7 Feb 2011 01:32:54 +0000 Subject: syncdaemon: improve program termination - get rid of annoying "TypeError: 'str' object is not callable" message with python 2.4 - don't leave program hanging dead when failure is hit Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 2380 (TypeError: 'str' object is not callable) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2380 --- xlators/features/marker/utils/syncdaemon/gsyncd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index 5a9ead66579..4d8b9f96dab 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -139,9 +139,11 @@ def main(): if exc != SystemExit: logging.exception("FAIL: ") sys.stderr.write("failed with %s.\n" % exc.__name__) - exit(1) + sys.exit(1) finally: finalize() + # force exit in non-main thread too + os._exit(1) def main_i(): rconf = {'go_daemon': 'should'} -- cgit