Changes

125 bytes added ,  15:26, 25 June 2014
no edit summary
Line 1: Line 1: −
The criu can call your hooks on various stages of dumping/restoring. These hooks are added with the --action-script shell-code-to-execute option. When called, the CRTOOLS_SCRIPT_ACTION environment is set to a value determining which type of action is performed. It can be one of
+
The criu can call your hooks on various stages of dumping/restoring. Cooks can be one of
    
;network-lock
 
;network-lock
Line 12: Line 12:  
;setup-namespaces
 
;setup-namespaces
 
: called when the root task is alive and new set of namespaces is created to set them up
 
: called when the root task is alive and new set of namespaces is created to set them up
 +
 +
 +
== CLI ==
 +
These hooks are added with the --action-script shell-code-to-execute option. When called, the CRTOOLS_SCRIPT_ACTION environment is set to a value determining which type of action is performed.
    
== RPC ==
 
== RPC ==
    
In case or RPC, action scripts are implemented as notifications -- once CRIU service wants to execute a script it send an RPC message to caller and waits for it to respond with <code>criu_req</code> message having <code>notify_success = true</code>.
 
In case or RPC, action scripts are implemented as notifications -- once CRIU service wants to execute a script it send an RPC message to caller and waits for it to respond with <code>criu_req</code> message having <code>notify_success = true</code>.
 +
 +
== Library ==
 +
 +
When using a library one can setup a callback using the <code>criu_set_notify</code> routine.