summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py4
-rw-r--r--pym/_emerge/actions.py6
2 files changed, 3 insertions, 7 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index bf562c568..16948df76 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -63,7 +63,8 @@ class EbuildMetadataPhase(SubProcess):
else:
fd_pipes = {}
- fd_pipes.setdefault(0, sys.stdin.fileno())
+ null_input = open('/dev/null', 'rb')
+ fd_pipes.setdefault(0, null_input.fileno())
fd_pipes.setdefault(1, sys.stdout.fileno())
fd_pipes.setdefault(2, sys.stderr.fileno())
@@ -96,6 +97,7 @@ class EbuildMetadataPhase(SubProcess):
fd_pipes=fd_pipes, returnpid=True)
os.close(slave_fd)
+ null_input.close()
if isinstance(retval, int):
# doebuild failed before spawning
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 28fe549e8..036b471a1 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1864,12 +1864,6 @@ def action_regen(settings, portdb, max_jobs, max_load):
xterm_titles = "notitles" not in settings.features
emergelog(xterm_titles, " === regen")
#regenerate cache entries
- try:
- os.close(sys.stdin.fileno())
- except SystemExit:
- raise # Needed else can't exit
- except:
- pass
sys.stdout.flush()
regen = MetadataRegen(portdb, max_jobs=max_jobs, max_load=max_load)