From b39ff144bd47952ee06bba0b549069c635d31a31 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 15 Feb 2012 14:28:41 -0800 Subject: [PATCH] MergeProcess: inherit stdin for use with pdb --- pym/portage/dbapi/_MergeProcess.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index 1747a098b..21d43dd83 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -4,6 +4,7 @@ import io import platform import signal +import sys import traceback import errno @@ -40,6 +41,12 @@ class MergeProcess(SpawnProcess): settings.reset() settings.setcpv(cpv, mydb=self.mydbapi) + # Inherit stdin by default, so that the pdb SIGUSR1 + # handler is usable for the subprocess. + if self.fd_pipes is None: + self.fd_pipes = {} + self.fd_pipes.setdefault(0, sys.stdin.fileno()) + super(MergeProcess, self)._start() def _lock_vdb(self): -- 2.26.2