Changes

Jump to: navigation, search

External UNIX socket

94 bytes removed, 18:42, 30 August 2016
reformat the "Limitations", proper structure, etc.
== Limitations ==
Named unix sockets with stream/seqpacket options can't be dumped\restored now, see plan below.
== What Some types of sockets are hard to do deal with stream/seqpacket? ==.
Such sockets cannot be just dumped and restored as once we dump one end, the other one seen EOF on socket and may close one. The plan for this is to extend the --ext-unix-sk semantics to work like this=== stream/seqpacket ===
* On dump the <code>--ext-Named unix-sk $id<sockets with stream/code> says that socket with $id is OK to seqpacket options can't be disconnecteddumped/restored, as once we dump one end,* On restore the <code>--ext-unix-sk$id[=$path]</code> says that other one will see EOF on the socket $id should be reconnected back to the path and may close it say on dump (or to the $path).
== What The plan for this is to do with socketpair()-s? ==Unnamed unix sockets created with socketpair() systemcall can be dumped and restored.For dump socketpair put inode of this socket in extend the <code>--ext-unix-sk</code> option, for examplesemantics to work like this:
* On dump, the <code>criu dump -D images -o dump.log ext-v4 unix-sk $id</code> says that socket with $id is OK to be disconnected* On restore, the <code>--ext-unix-sk$id[=11890815 -t 16528$path]</code>says that the socket $id should be reconnected back to the path it say on dump (or to the $path).
For restore === socketpair the server should create new pair and call criu restore asking it to [[Inheriting FDs on restore|inherit]] one. Example of command:===
Unnamed unix sockets created with <code>criu restore -d -D images -o restore.log --pidfile restore.pid -v4 -x --inherit-fd fd[3]:socket:[11890815]socketpair()</code>system call can be dumped and restored.
test source On dump, put inode of this socket in <code>--ext-unix-sk</code> option, for example:  criu dump -D images -o dump.log -v4 --ext-unix-sk=11890815 -t 16528 On restore, the server should create a new pair and call <code>criu restore</code also > asking it to [[Inheriting FDs on restore|inherit]] one.For example:  criu restore -d -D images -o restore.log --pidfile restore.pid -v4 -x --inherit-fd fd[3]:socket:[11890815] Test is available for this feature and can be found in criu source tree under , see test/socketpairsin criu sources.
== See also ==

Navigation menu