From def107e4d48042d3acd5ed48a714b23465cde514 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 25 May 2007 20:22:53 +0000 Subject: 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 --- pym/portage/__init__.py | 4 ++-- 1 file 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], -- cgit v1.2.3-1-g7c22