From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: PATCH [xenconsoled]: makes pty slave raw early Date: Wed, 16 Jan 2008 11:06:17 +0000 Message-ID: <20080116110617.GF4261@implementation.uk.xensource.com> References: <20080116053004.GA18526@localhost.localdomain> <20080116105853.GA26724@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20080116105853.GA26724@totally.trollied.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: John Levon Cc: tgingold@free.fr, Xen-devel List-Id: xen-devel@lists.xenproject.org John Levon, le Wed 16 Jan 2008 10:58:53 +0000, a écrit : > On Wed, Jan 16, 2008 at 06:30:04AM +0100, tgingold@free.fr wrote: > > > diff -r ca2828a46217 -r 0353ead264ba tools/console/daemon/io.c > > --- a/tools/console/daemon/io.c Wed Jan 16 06:21:50 2008 +0100 > > +++ b/tools/console/daemon/io.c Wed Jan 16 06:25:43 2008 +0100 > > @@ -278,8 +278,10 @@ static int openpty(int *amaster, int *as > > if (winp) > > ioctl(sfd, TIOCSWINSZ, winp); > > > > + if (termp) > > + tcsetattr(sfd, TCSAFLUSH, termp); > > + > > This is wrong. openpty() only retrieves term settings, not sets it. Please re-read manpages: « If termp is not NULL, the terminal parameters of the slave will be set to the values in termp. » And in glibc the termp structure recently got const. Samuel