head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2026.04.19.10.48.05; author wiz; state Exp; branches; next 1.1; commitid GXiHiOhFe6tiEyCG; 1.1 date 2026.04.16.06.30.38; author wiz; state Exp; branches; next ; commitid T5rfmoiuIK9Uj9CG; desc @@ 1.2 log @meld: fix fd leak Bump PKGREVISION. @ text @$NetBSD: patch-meld_matchers_helpers.py,v 1.1 2026/04/16 06:30:38 wiz Exp $ Another try at closing a file descriptor leak. https://gitlab.gnome.org/GNOME/meld/-/issues/962 --- meld/matchers/helpers.py.orig 2024-03-24 01:06:00.000000000 +0000 +++ meld/matchers/helpers.py @@@@ -1,4 +1,5 @@@@ +import gc import logging import multiprocessing import queue @@@@ -76,6 +77,17 @@@@ class CachedSequenceMatcher: self.thread.terminate() self.cache = {} self.queued_matches = {} + for q in (self.tasks, self.results): + if q is not None: + q.close() + q.join_thread() + if self.thread is not None: + self.thread.tasks = None + self.thread.results = None + self.tasks = None + self.results = None + self.thread = None + gc.collect() def match(self, text1, textn, cb): texts = (text1, textn) @ 1.1 log @meld: another try at closing one (of a couple) file descriptor leaks Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ d4 1 d6 1 a6 1 --- meld/matchers/helpers.py.orig 2026-04-12 07:49:00.516252865 +0000 d8 7 a14 1 @@@@ -76,6 +76,11 @@@@ class CachedSequenceMatcher: d19 1 a19 1 + try: d21 8 a28 2 + except: + pass @