From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A9B5138359 for ; Sat, 8 Aug 2020 04:13:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1F8AE0636; Sat, 8 Aug 2020 04:13:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 685C2E0391 for ; Sat, 8 Aug 2020 04:13:22 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH 0/3] sqlite: fork safety (bug 736334) Date: Fri, 7 Aug 2020 21:08:54 -0700 Message-Id: <20200808040857.77352-1-zmedico@gentoo.org> X-Mailer: git-send-email 2.25.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 493efbeb-acc4-417c-9b43-b5c1ed05b6ad X-Archives-Hash: c01d356208507e951f60a41061b33fba Use a separate connection instance for each pid, since it is not safe to use a connection created in a parent process. See: https://www.sqlite.org/howtocorrupt.html Bug: https://bugs.gentoo.org/736334 Zac Medico (3): Add cached portage.getpid() function sqlite: add lazy connection init sqlite: fork safety (bug 736334) lib/portage/__init__.py | 14 +++++++++ lib/portage/cache/sqlite.py | 30 +++++++++++++++---- lib/portage/tests/dbapi/test_auxdb.py | 13 ++++++-- .../tests/process/test_AsyncFunction.py | 24 +++++++++++++++ 4 files changed, 74 insertions(+), 7 deletions(-) -- 2.25.3