Gentoo Archives: gentoo-portage-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] pty/termios problems on "alternative platforms"
Date: Fri, 25 May 2007 13:17:25
Message-Id: 20070525131557.GO1235@gentoo.org
In Reply to: [gentoo-portage-dev] pty/termios problems on "alternative platforms" by Fabian Groffen
1 On 25-05-2007 15:04:24 +0200, Fabian Groffen wrote:
2 ...
3 > raise an exception on the pty code, but only bails out on the
4 > termios.tcgetattr function because it gets an "invalid argument".
5
6 from the code pym/portage/__init__.py around line 2288
7
8 from pty import openpty
9 master_fd, slave_fd = openpty()
10 # Disable the ECHO attribute so the terminal behaves properly
11 # if the subprocess needs to read input from stdin.
12 import termios
13 term_attr = termios.tcgetattr(master_fd)
14 term_attr[3] &= ~termios.ECHO
15 termios.tcsetattr(master_fd, termios.TCSAFLUSH, term_attr)
16
17 if I comment out the complete termios (last four lines) it appears to
18 work, though I don't know what repercussions this has on the rest of the
19 code. Judging from the comment, it feels not so right.
20
21 --
22 Fabian Groffen
23 Gentoo on a different level
24 --
25 gentoo-portage-dev@g.o mailing list

Replies