[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 15/15] libxl: Re-implement domain_suspend_device_model using libxl__ev_qmp
On Tue, Oct 16, 2018 at 04:28:55PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH v5 15/15] libxl: Re-implement > domain_suspend_device_model using libxl__ev_qmp"): > > + if (rc) > > + goto error; > > + > > + libxl__carefd_begin(); > > + ev->cfd = libxl__carefd_opened(CTX, > > + open(filename, O_WRONLY | O_CREAT, 0600)); > > Does this statefile fd really need to be a carefd ? Is it a pipe or a > file ? If it is a file, is it of nontrivial size ? Yes, it needs to be caredfd, because that's what the libxl__ev_qmp API wants. I don't know yet if it is a good idee to have the _ev_qmp API only takes fd. Do you think it's fine to have libxl__ev_qmp API takes a simple fd and let callers handle the fd the way they want? (In previous version of the patch series, libxl__ev_qmp used to close the carefd. That's not the case anymore, and that carefd is only read, so I don't think it matter anymore which kind it is between int and carefd.) > If it's a file of a few kb, which I think is the case, then the worst > result of (with very low probability) leaking this fd into another > process is simply that the file might be kept alive for a while after > it was deleted. -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |