Changes

484 bytes added ,  07:51, 30 July 2015
Line 30: Line 30:     
== What to do with socketpair()-s? ==
 
== What 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 <code>--ext-unix-sk</code> option, for example:
   −
To restore socketpair we need more help from the server -- the server should create new pair and call criu restore asking it to [[Inheriting FDs on restore|inherit]] one.
+
<code>
 +
criu dump -D images -o dump.log -v4 --ext-unix-sk=11890815 -t 16528
 +
</code>
 +
 
 +
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:
 +
 
 +
<code>
 +
criu restore -d -D images -o restore.log --pidfile restore.pid -v4 -x --inherit-fd fd[3]:socket:[11890815]
 +
</code>
 +
 
 +
test source code also available for this feature and can be found in criu source tree under test/socketpairs.
    
== See also ==
 
== See also ==
5

edits