]> git.neil.brown.name Git - edlib.git/commitdiff
notmuch: don't leave un-waited processes.
authorNeilBrown <neil@brown.name>
Wed, 15 Feb 2023 02:41:14 +0000 (13:41 +1100)
committerNeilBrown <neil@brown.name>
Wed, 15 Feb 2023 02:41:14 +0000 (13:41 +1100)
If a timeout expires, kill the process and wait for it.  Don't just
leave it there.

Signed-off-by: NeilBrown <neil@brown.name>
python/module-notmuch.py

index 1a06072cc11fb5ece6eb2987ca8b6f2fba84a6c9..efc99e69bf52ca9784b8d30ac453c45428809ba8 100644 (file)
@@ -66,6 +66,8 @@ def notmuch_get_tags(msg=None,thread=None):
     except IOError:
         return
     except TimeoutExpired:
+        p.kill()
+        out,err = p.communicate()
         return
     return out.decode("utf-8","ignore").strip('\n').split('\n')
 
@@ -82,6 +84,8 @@ def notmuch_get_file(msg):
     except IOError:
         return
     except TimeoutExpired:
+        p.kill()
+        out,err = p.communicate()
         return
     return out.decode("utf-8","ignore").strip('\n')