From: Zac Medico Date: Wed, 15 Feb 2012 22:28:41 +0000 (-0800) Subject: MergeProcess: inherit stdin for use with pdb X-Git-Tag: v2.2.0_alpha87~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b39ff144bd47952ee06bba0b549069c635d31a31;p=portage.git MergeProcess: inherit stdin for use with pdb --- 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):