[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.