WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] PATCH [xenconsoled]: makes pty slave raw early

To: John Levon <levon@xxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] PATCH [xenconsoled]: makes pty slave raw early
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Wed, 16 Jan 2008 11:06:17 +0000
Cc: tgingold@xxxxxxx, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Jan 2008 03:07:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080116105853.GA26724@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, John Levon <levon@xxxxxxxxxxxxxxxxx>, tgingold@xxxxxxx, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <20080116053004.GA18526@xxxxxxxxxxxxxxxxxxxxx> <20080116105853.GA26724@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
John Levon, le Wed 16 Jan 2008 10:58:53 +0000, a écrit :
> On Wed, Jan 16, 2008 at 06:30:04AM +0100, tgingold@xxxxxxx 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel