From: Ian Jackson Subject: Re: Re: [Qemu-devel] vnc port selection Date: Tue, 26 Aug 2008 11:15:41 +0100 Message-ID: <18611.55245.558414.100485@mariner.uk.xensource.com> References: <48AD99CF.6070004@redhat.com> <48ADB43D.9050401@qumranet.com> <48ADB58D.9070409@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48ADB58D.9070409@codemonkey.ws> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: Xen Development Mailing List , qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org Anthony Liguori writes ("[Xen-devel] Re: [Qemu-devel] vnc port selection"): > Avi Kivity wrote: > > Presumably -vncunused is passed by the management application, which > > knows about all domains. Can't it figure out an unused port and pass > > it on? > > An argument for this sort of semantics is that if you just launch > vncserver with no argument, it'll sit on the first unused port. So > people are sort of used to this behavior. Exactly. So that's why we need both the ability to do this, and the ability to find out what port was eventually used. > > Alternatively, have the management application pass an fd denoting the > > socket. > > If you are allocating the ports in the management tool, then just tell > QEMU what port to open up. I don't think you gain anything passing an fd. That has a race, because you commit to the port before having prevented another application from grabbing it. I think the `pick unused port' option is more sensible. Ian.