aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-02-09 08:47:31 +0000
committerSam James <sam@gentoo.org>2024-02-09 08:51:17 +0000
commitc4049323b3c4c04ccc56023fa31169da58b57831 (patch)
treeca84cff0951e99fa4617ac63d93b8410fac7e3f9
parentEbuildPhase: async_check_locale (diff)
downloadportage-c4049323.tar.gz
portage-c4049323.tar.bz2
portage-c4049323.zip
Revert "gpkg: on error, close stdin before killing external programs"
This reverts commit fba76a545f29fb8b529197c25c64700ef77413ae. This seems to cause hangs in CI with pypy3. Zac mentioned this at https://github.com/gentoo/portage/pull/1246#issuecomment-1935511379 and I can reproduce it with `tox -e pypy3-test` with PyPy 7.3.15. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--lib/portage/gpkg.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/portage/gpkg.py b/lib/portage/gpkg.py
index 05f1b5f2a..031b3f87c 100644
--- a/lib/portage/gpkg.py
+++ b/lib/portage/gpkg.py
@@ -149,9 +149,9 @@ class tar_stream_writer:
kill external program if any error happened in python
"""
if self.proc is not None:
- self.proc.stdin.close()
- self.proc.kill()
self.killed = True
+ self.proc.kill()
+ self.proc.stdin.close()
self.close()
def _cmd_read_thread(self):
@@ -347,9 +347,9 @@ class tar_stream_reader:
kill external program if any error happened in python
"""
if self.proc is not None:
- self.proc.stdin.close()
- self.proc.kill()
self.killed = True
+ self.proc.kill()
+ self.proc.stdin.close()
self.close()
def read(self, bufsize=-1):