<div dir="ltr">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.<div>
<br></div><div>--Saied</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 12:49 PM, Tycho Andersen <span dir="ltr"><<a href="mailto:tycho.andersen@canonical.com" target="_blank">tycho.andersen@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ruslan,<br>
<div class=""><br>
On Wed, Jul 16, 2014 at 10:42:57PM +0300, Ruslan Kuprieiev wrote:<br>
> Hi Tycho,<br>
><br>
</div><div class="">> On 16.07.2014 22:22, Tycho Andersen wrote:<br>
> >Hi Ruslan,<br>
> ><br>
> >On Wed, Jul 16, 2014 at 10:16:01PM +0300, Ruslan Kuprieiev wrote:<br>
> >>So, that lib would do smth like fork+exec criu? And criu process<br>
> >>would be in the<br>
> >>tree that you want to dump, right?<br>
> >The way I was thinking of libcriu is just as a set of c functions:<br>
> ><br>
> >void dump(pid_t, ...);<br>
> >bool restore(char *image_dir, ...);<br>
> ><br>
> >that you could call and criu would do what it normally does (although<br>
> >probably this implies --restore-detached, among other things), so<br>
> >there wouldn't be any forking to start the criu daemon.<br>
><br>
> So, basically, you want to make the whole criu to be a lib?<br>
<br>
</div>Yes, that's what I'm after.<br>
<div class=""><br>
> And the process, that would use this lib, would be in the same tree<br>
> you are trying<br>
> to dump? The problem is criu wouldn't be able to separate it's own<br>
> resources from<br>
> those it is trying to dump.<br>
<br>
</div>No, it is a separate process tree, for which I know the pid, but is<br>
unrelated to the process that I'd be calling dump() from.<br>
<div class="HOEnZb"><div class="h5"><br>
Tycho<br>
_______________________________________________<br>
CRIU mailing list<br>
<a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
<a href="https://lists.openvz.org/mailman/listinfo/criu" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
</div></div></blockquote></div><br></div>