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

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Re-introduce Xenctrl.with_intf wrapper

  • To: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
  • From: Christian Lindig <christian.lindig@xxxxxxxxxx>
  • Date: Tue, 30 Oct 2018 17:11:20 +0000
  • Accept-language: en-GB, en-US
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>
  • Delivery-date: Tue, 30 Oct 2018 17:12:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHUcEH8ZsM/0EkdLUS3Ebe06iKfPqU374gAgAABwgCAAAHbAIAAAroA
  • Thread-topic: [Xen-devel] [PATCH 1/1] tools/ocaml: Re-introduce Xenctrl.with_intf wrapper

> On 30 Oct 2018, at 17:01, Ian Jackson <ian.jackson@xxxxxxxxxx> wrote:
> Well, yes, but who would ever call it ?  It's not safe to use except
> at the toplevel (whatever that means, but probably outside any
> with_intf) because elsewhere you don't know whose work you're
> sabotaging.
> Which reminds me: why do you say it is wrong to use both
> interface_open and with_intf ?  It's clumsy and probably a mistake but
> it should function correctly I think.

I agree that it would not harm but conceptually I believe you 
should manage this explicitly using interface_{open/close} or implicitly 
using with_intf. I would use an exit handler to close this global handle
but it would be safe to never close it and to let the process terminate.

I said “should not” rather than “must not” for that reason. Maybe that is

— C
Xen-devel mailing list



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