diff options
author | Csaba Henk <csaba@gluster.com> | 2011-02-07 01:32:54 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-07 00:59:05 -0800 |
commit | 67f842aa406a05fd701f9dbdcd373516fa529087 (patch) | |
tree | 4de0cb8d6fa46c96c787e21edb2fb0d332ee7959 /xlators/features | |
parent | 681928ddc750c28b12ec5097aff0dc694a5275d6 (diff) |
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 <csaba@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2380 (TypeError: 'str' object is not callable)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2380
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/gsyncd.py | 4 |
1 files changed, 3 insertions, 1 deletions
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'} |