]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_argparse: make command ceph acceph SIGINT. 25763/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 3 Jan 2019 06:34:43 +0000 (14:34 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 3 Jan 2019 06:34:43 +0000 (14:34 +0800)
If no --connect-timeout point and there is no ceph.conf, the command
'ceph -s' can't stop by ctrl+c.
This introduced by commit 4d8fc26c8
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/pybind/ceph_argparse.py

index af51b39f31b8aad567bf9eb955029a975040f8e6..26c24f275123dca42decfd903077fbcbb1237470 100644 (file)
@@ -1287,7 +1287,7 @@ class RadosThread(threading.Thread):
 def run_in_thread(func, *args, **kwargs):
     interrupt = False
     timeout = kwargs.pop('timeout', 0)
-    if timeout == 0:
+    if timeout == 0 or timeout == None:
         # python threading module will just get blocked if timeout is `None`,
         # otherwise it will keep polling until timeout or thread stops.
         timeout = 2 ** 32