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]do not allow multiple xenconsole connect to the s

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]do not allow multiple xenconsole connect to the same pty
From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Feb 2011 19:49:00 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Li Dongyang <lidongyang@xxxxxxxxxx>
Delivery-date: Tue, 15 Feb 2011 11:49:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII=
In-reply-to: <19802.54932.293842.532179@xxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201102151207.38331.lidongyang@xxxxxxxxxx> <19802.54932.293842.532179@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 15 Feb 2011 19:40:04 +0000
Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:

> Li Dongyang writes ("[Xen-devel] [PATCH]do not allow multiple xenconsole 
> connect to the same pty"):
> > allowing multiple xenconsole connect to the same pty is just insane,
> > prevent this by acquiring a write flock on the pty fd once we opened it.
> 
> I don't think that flocking a pty is likely to be very portable.
> 
> I guess what happens at the moment if you do this is that input is
> interleaved (fine) but output is distributed randomly amongst the
> available clients ?

Use POSIX pty interfaces and you don't get these problems. See
grantpt/unlockpt/posix_openpt.


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