− | When dumping a process sub-tree, crtools checks that the resulting image is consistent and self-contained, meaning if an object A references another object B, and A goes into dump, then B should be dumped as well. For example, if there is a pipe, and crtools dumps its one end (object A) because it belongs to a process it dumps, it must also dump the other end of the pipe (object B), meaning it should take a process owning B into the image as well. Same is true for unix sockets: if there is a socket (A) that is <code>connect()</code>ed to another socket (B), and crtools dumps socket A (because it is opened by a process it dumps), it must also dump socket B and the task who owns it. Possibly socket B is dumped some time later in the dumping process, but it must be dumped. | + | When dumping a process sub-tree, criu checks that the resulting image is consistent and self-contained, meaning if an object A references another object B, and A goes into dump, then B should be dumped as well. For example, if there is a pipe, and criu dumps its one end (object A) because it belongs to a process it dumps, it must also dump the other end of the pipe (object B), meaning it should take a process owning B into the image as well. Same is true for unix sockets: if there is a socket (A) that is <code>connect()</code>ed to another socket (B), and criu dumps socket A (because it is opened by a process it dumps), it must also dump socket B and the task who owns it. Possibly socket B is dumped some time later in the dumping process, but it must be dumped. |
| This restriction is in place to make sure that upon restore applications will continue to work, rather than, say, receive SIGPIPE signals due to half-closed pipes or sockets. | | This restriction is in place to make sure that upon restore applications will continue to work, rather than, say, receive SIGPIPE signals due to half-closed pipes or sockets. |
− | With that said, "external socket is used" error means crtools detected a unix socket connected to another socket which is not being dumped (because it belongs to a process not going into the image). | + | With that said, "external socket is used" error means criu detected a unix socket connected to another socket which is not being dumped (because it belongs to a process not going into the image). |
| This is when <code>--ext-unix-sk</code> option should be used. By providing this option (for both dump and restore commands), user states "I know there may be uni-directional unix connections, and I will make sure the server end will exist on restore". | | This is when <code>--ext-unix-sk</code> option should be used. By providing this option (for both dump and restore commands), user states "I know there may be uni-directional unix connections, and I will make sure the server end will exist on restore". |
− | For '''crtools dump''', this option enables dumping unix sockets with additional information about that other ("external") socket it is connected to. | + | For '''criu dump''', this option enables dumping unix sockets with additional information about that other ("external") socket it is connected to. |
− | For '''crtools restore''', this option asks crtools to re-connect such sockets back. | + | For '''criu restore''', this option asks criu to re-connect such sockets back. |