[CRIU] Towards an in-process libcriu
Ruslan Kuprieiev
kupruser at gmail.com
Wed Jul 16 13:38:29 PDT 2014
Hi Tycho,
On 16.07.2014 22:49, Tycho Andersen 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.
Oh! I see. But there is another problem. I believe, criu doesn't free
all resources
after it is done its work.
Thanks,
Ruslan
> Tycho
More information about the CRIU
mailing list