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 6/6] libxl: vncviewer: make autopass work properl

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 6/6] libxl: vncviewer: make autopass work properly
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 4 Feb 2011 11:15:36 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 04 Feb 2011 03:14:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19786.63117.565925.259009@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: <1296584702-20138-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-2-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-3-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-4-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-5-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-6-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1296584702-20138-7-git-send-email-ian.jackson@xxxxxxxxxxxxx> <alpine.DEB.2.00.1102031236040.7277@kaball-desktop> <19786.63117.565925.259009@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Thu, 3 Feb 2011, Ian Jackson wrote:
> Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 6/6] libxl: vncviewer: 
> make autopass work properly"):
> > On Tue, 1 Feb 2011, Ian Jackson wrote:
> > > +        if ( autopass_fd < 0 ) {
> > > +            LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
> > > +                             "mkstemp %s failed", tmpname);
> > > +            exit(-1);
> > > +        }
> > 
> > I don't think we should call exit here, this is a library not an
> > executable. However instead of just skipping autopass we should avoid
> > exec'ing vncviewer completely and return and error.
> 
> The caller must already tolerate the function simply causing the
> process to die, because execve can fail like that.  Ie,
> libxl_exec_vncviewer is already called only after fork.  So it seemed
> best to have the function always fail the same way.
> 
> If we had a function which merely returned the vnc connection info, I
> would agree with you that it shouldn't exit.  We should do that in 4.2.

Even though it might be tolerable to have this function exits, I still
don't see any benefits as opposed to failing with an error, considering
that this function returns an integer and the long term plan would be
to return an error anyway.
It is just a matter of checking the return value in
tools/libxl/xl_cmdimpl.c:vncviewer.

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

<Prev in Thread] Current Thread [Next in Thread>