From 223bfc4d19a2b7cccc62e05129e09591233edc44 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 17 Mar 2011 00:46:38 +0000 Subject: syncdaemon: fix up exit value Signed-off-by: Csaba Henk Signed-off-by: Vijay Bellur 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/features/marker/utils') diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index ba3141f66..e34a6bcb2 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -153,6 +153,7 @@ def main(): # but this handler neither does # signal.signal(signal.SIGTERM, finalize) GLogger.setup() + exval = 0 try: try: main_i() @@ -161,11 +162,12 @@ def main(): if exc != SystemExit: logging.exception("FAIL: ") sys.stderr.write("failed with %s.\n" % exc.__name__) - sys.exit(1) + exval = 1 + sys.exit(exval) finally: finalize() # force exit in non-main thread too - os._exit(1) + os._exit(exval) def main_i(): rconf = {'go_daemon': 'should'} -- cgit