[CRIU] Towards an in-process libcriu
Saied Kazemi
saied at google.com
Wed Jul 16 13:41:51 PDT 2014
Having libcriu with C bindings is a great feature. In addition to LXC as
Tycho has mentioned, other Docker exec drivers will be able to use it too.
In fact, from within any program, one would call dump() and restore() to
do what is currently done on the command line.
--Saied
On Wed, Jul 16, 2014 at 12:49 PM, Tycho Andersen <
tycho.andersen at canonical.com> wrote:
> Hi Ruslan,
>
> On Wed, Jul 16, 2014 at 10:42:57PM +0300, Ruslan Kuprieiev wrote:
> > Hi Tycho,
> >
> > On 16.07.2014 22:22, Tycho Andersen wrote:
> > >Hi Ruslan,
> > >
> > >On Wed, Jul 16, 2014 at 10:16:01PM +0300, Ruslan Kuprieiev wrote:
> > >>So, that lib would do smth like fork+exec criu? And criu process
> > >>would be in the
> > >>tree that you want to dump, right?
> > >The way I was thinking of libcriu is just as a set of c functions:
> > >
> > >void dump(pid_t, ...);
> > >bool restore(char *image_dir, ...);
> > >
> > >that you could call and criu would do what it normally does (although
> > >probably this implies --restore-detached, among other things), so
> > >there wouldn't be any forking to start the criu daemon.
> >
> > So, basically, you want to make the whole criu to be a lib?
>
> Yes, that's what I'm after.
>
> > And the process, that would use this lib, would be in the same tree
> > you are trying
> > to dump? The problem is criu wouldn't be able to separate it's own
> > resources from
> > those it is trying to dump.
>
> No, it is a separate process tree, for which I know the pid, but is
> unrelated to the process that I'd be calling dump() from.
>
> Tycho
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140716/4ac3b5ab/attachment-0001.html>
More information about the CRIU
mailing list