Changes

Jump to navigation Jump to search
134 bytes added ,  13:07, 13 July 2017
no edit summary
Line 1: Line 1: −
This page describes how the <code>exec</code> command in criu works.
+
{{Note|The exec action is in [[deprecation]] list and has been removed in [[Download/criu/3.0|3.0]]. [[Compel]] is the new way of doing tricks described below}}
    
== Description ==
 
== Description ==
Line 19: Line 19:  
* If an argument starts with '&', the rest of it is copied to the target task's address space (it's allocated by remotely calling the <code>mmap</code> syscall) and the pointer to this area is passed as the system call argument
 
* If an argument starts with '&', the rest of it is copied to the target task's address space (it's allocated by remotely calling the <code>mmap</code> syscall) and the pointer to this area is passed as the system call argument
   −
* If an argument starts with '@', the rest of is is considered to be a size of a memory buffer, pointer to which is passed into a syscall and which contents is printed on the screen after the syscall returns. Note, that before pushing the argument into the syscall, the memory is ''not'' initialized.
+
* If an argument starts with '@', the rest of it is considered to be a size of a memory buffer, pointer to which is passed into a syscall and which contents is printed on the screen after the syscall returns. Note, that before pushing the argument into the syscall, the memory is ''not'' initialized.
    
* Otherwise, the argument is converted into an <code>unsigned long</code> number with <code>strtol</code> and passed to system call directly
 
* Otherwise, the argument is converted into an <code>unsigned long</code> number with <code>strtol</code> and passed to system call directly
Line 48: Line 48:  
# criu exec -t <pid> madvise <start> <lenght> <madvise-bits-value>
 
# criu exec -t <pid> madvise <start> <lenght> <madvise-bits-value>
 
</pre>
 
</pre>
 +
 +
[[Category:API]]
 +
[[Category:Deprecated]]

Navigation menu