Changes

Jump to navigation Jump to search
421 bytes added ,  13:07, 13 July 2017
no edit summary
Line 1: Line 1: −
This page describes how the <code>exec</code> command in crtools 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 10: Line 10:     
<pre>
 
<pre>
crtools exec -t <pid> <syscall-name> <syscall-arguments>
+
criu exec -t <pid> <syscall-name> <syscall-arguments>
 
</pre>
 
</pre>
   Line 18: Line 18:     
* 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 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 33: Line 35:     
<pre>
 
<pre>
# crtools exec -t <pid> close 1
+
# criu exec -t <pid> close 1
# crtools exec -t <pid> open '&<path-to-file>' 2
+
# criu exec -t <pid> open '&<path-to-file>' 2
 
</pre>
 
</pre>
   Line 44: Line 46:     
<pre>
 
<pre>
# crtools 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