Commit 0f58bae4 authored by Pavel Emelyanov's avatar Pavel Emelyanov

doc: Add syscalls execution description

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 15901c2d
...@@ -31,6 +31,9 @@ OPTIONS ...@@ -31,6 +31,9 @@ OPTIONS
* 'check' * 'check'
to test whether the kernel support is up-to-date to test whether the kernel support is up-to-date
* 'exec'
to execute a system call from other task's context
-c:: -c::
In case of 'show' command the dumped pages content will be shown in hex format. In case of 'show' command the dumped pages content will be shown in hex format.
...@@ -109,6 +112,27 @@ OPTIONS ...@@ -109,6 +112,27 @@ OPTIONS
-h|--help:: -h|--help::
Print inline help. Print inline help.
SYSCALLS EXECUTION
------------------
To run a system call from another task's context use
crtools exec -t <pid> <syscall-string>
command. The syscall string should look like
<syscall-name> <syscall-arguments>...
Each command line argument is transformed into the system call argument by
the following rules:
* If one starts with '&', the rest of it gets copied to the target task's
address space and the respective syscall argument is the pointer to this
string;
* Otherwise it's treated as a number (converted with strtol) and is directly
passed into the system call.
EXAMPLES EXAMPLES
-------- --------
...@@ -121,6 +145,17 @@ To restore this program detaching crtools itself, one should type ...@@ -121,6 +145,17 @@ To restore this program detaching crtools itself, one should type
crtools restore -d -D checkpoint -t 1234 crtools restore -d -D checkpoint -t 1234
To close a file descriptor number '1' in task with pid '1234' run
crtools exec -t 1234 close 1
To open a file named '/foo/bar' for read-write in the task with pid
'1234' run
crtools exec -t 1234 open '&/foo/bar' 2
AUTHOR AUTHOR
------ ------
OpenVZ team. OpenVZ team.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment