summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/EbuildFetcher.py3
-rw-r--r--pym/portage/dbapi/_MergeProcess.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py
index 6ad434129..c0175b3fb 100644
--- a/pym/_emerge/EbuildFetcher.py
+++ b/pym/_emerge/EbuildFetcher.py
@@ -164,6 +164,9 @@ class EbuildFetcher(SpawnProcess):
pid = os.fork()
if pid != 0:
+ if not isinstance(pid, int):
+ raise AssertionError(
+ "fork returned non-integer: %s" % (repr(pid),))
portage.process.spawned_pids.append(pid)
return [pid]
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index cf5926529..1747a098b 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -129,6 +129,10 @@ class MergeProcess(SpawnProcess):
pid = os.fork()
if pid != 0:
+ if not isinstance(pid, int):
+ raise AssertionError(
+ "fork returned non-integer: %s" % (repr(pid),))
+
os.close(elog_writer_fd)
self._elog_reader_fd = elog_reader_fd
self._buf = ""