[CRIU] [PATCH 1/6] lib: add support for --action-script in libcriu

Pavel Emelyanov xemul at parallels.com
Mon Aug 4 06:44:27 PDT 2014


On 08/04/2014 05:18 PM, Tycho Andersen wrote:
> Hi Pavel,
> 
> On Mon, Aug 04, 2014 at 01:54:37PM +0400, Pavel Emelyanov wrote:
>> On 07/29/2014 09:06 PM, Tycho Andersen wrote:
>>
>> Hi, Tycho!
>>
>> The issue with action scripts in library is quite nasty.
>>
>> First of all, when using service, we cannot ask one to call any scripts, since
>> service is run as root and making it run user-provided code is unsafe. Instead
>> of doing this we make service respond back via socket when some script should
>> be called. At that time service waits for the client to do the action and wake
>> service back. This is what p.haul does and what Andrey pointed out.
>>
>> As far as the library is concerned -- I had an idea that we could register a
>> callback, that should be called when the service reports that we have to make
>> some action, but I haven't tried implementing it yet.
>>
>> How do you think actions would be suitable for you when used with library?
> 
> I think that exists already, doesn't it? That's what Andrew pointed me
> to (viz. criu_set_notify_cb()). Or do I misunderstand?

Oops :( Yes, it exists. It was me who implemented one and even put into the
master branch... I wonder what not-yet-implemented libcriu functionality I
have mixed it with :)

Thanks,
Pavel



More information about the CRIU mailing list