Line 13: |
Line 13: |
| However, sometimes it is possible to dump and successfully restore only one end of a unix socket pair. One particular example is the datagram sockets with on-way connection (client to server) used e.g. by <code>logd</code>. Server opens a datagram socket and waits on it for messages to be written into a log file. Processes using logd also create datagram sockets and connect those to the server. These connections are thus uni-directional. In this case it is possible to dump a program with the client-side socket and on restore the socket needs to be reconnected back to the original server. | | However, sometimes it is possible to dump and successfully restore only one end of a unix socket pair. One particular example is the datagram sockets with on-way connection (client to server) used e.g. by <code>logd</code>. Server opens a datagram socket and waits on it for messages to be written into a log file. Processes using logd also create datagram sockets and connect those to the server. These connections are thus uni-directional. In this case it is possible to dump a program with the client-side socket and on restore the socket needs to be reconnected back to the original server. |
| | | |
− | This is when <code>--external[...]</code> option should be used. By providing this option for both dump (now) and restore (in plans) commands, user states "I know there may be uni-directional dgram unix connections, and I will make sure the server end will exist on restore". | + | This is when {{Opt|--external}} option should be used. By providing this option for both dump (now) and restore (in plans) commands, user states "I know there may be uni-directional dgram unix connections, and I will make sure the server end will exist on restore". |
| | | |
| For '''criu dump''', this option enables dumping ''datagram'' unix sockets with additional information about that other ("external") socket it is connected to. | | For '''criu dump''', this option enables dumping ''datagram'' unix sockets with additional information about that other ("external") socket it is connected to. |
Line 31: |
Line 31: |
| | | |
| * On dump, the <code>--external unix[id]</code> says that socket with <code>''id''</code> is OK to be disconnected | | * On dump, the <code>--external unix[id]</code> says that socket with <code>''id''</code> is OK to be disconnected |
− | * On restore, the <code>--external ''id''[=''path'']</code> says that the socket <code>''id''</code> should be reconnected back to the path it say on dump (or to the specified <code>''path''</code>) (THIS IS IN PLANS!) | + | * On restore, the <code>--external unix[''id'']:''path''</code> says that the socket <code>''id''</code> should be reconnected back to the path it say on dump (or to the specified <code>''path''</code>) (THIS IS IN PLANS!) |
| | | |
| === socketpair === | | === socketpair === |
Line 50: |
Line 50: |
| == Old days == | | == Old days == |
| | | |
− | In earlier version of CRIU the same thing was specified with <code>-x|--ext-unix-sk</code> option. Note, that the <code>id</code> argument was optional and made CRIU treat as external any unconnected socket.
| + | For now the same thing is specified with <code>-x|--ext-unix-sk</code> option. Note, that the <code>id</code> argument was optional and made CRIU treat as external any unconnected socket. Soon this option will be [[deprecation|deprecated]]. |
| | | |
| == See also == | | == See also == |