summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-25 20:22:53 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-25 20:22:53 +0000
commitdef107e4d48042d3acd5ed48a714b23465cde514 (patch)
tree62a7e6c3f4af5e2d8ea493314dbcb91125796ae5
parentc48ae7ac7c7f6c8d3cb0f21253e8bb66ef8678bb (diff)
downloadportage-def107e4d48042d3acd5ed48a714b23465cde514.tar.gz
portage-def107e4d48042d3acd5ed48a714b23465cde514.tar.bz2
portage-def107e4d48042d3acd5ed48a714b23465cde514.zip
Call tcgetattr and tcsetattr on the slave end of the pty in order to avoid an "invalid argument" error on Solaris. Thanks to grobian.
svn path=/main/trunk/; revision=6625
-rw-r--r--pym/portage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index bc48de8a1..813b4f27f 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2284,9 +2284,9 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, **keyw
# Disable the ECHO attribute so the terminal behaves properly
# if the subprocess needs to read input from stdin.
import termios
- term_attr = termios.tcgetattr(master_fd)
+ term_attr = termios.tcgetattr(slave_fd)
term_attr[3] &= ~termios.ECHO
- termios.tcsetattr(master_fd, termios.TCSAFLUSH, term_attr)
+ termios.tcsetattr(slave_fd, termios.TCSAFLUSH, term_attr)
# tee will always exit with an IO error, so ignore it's stderr.
null_file = open('/dev/null', 'w')
mypids.extend(portage.process.spawn(['tee', '-i', '-a', logfile],