Documentation
¶
Index ¶
- Constants
- Variables
- func AddExternalFilesForDump(next types.Dump) types.Dump
- func CloseCommonFilesForDump(next types.Dump) types.Dump
- func DetectIOUringForDump(next types.Dump) types.Dump
- func DetectShellJobForDump(next types.Dump) types.Dump
- func DetectShellJobForRestore(next types.Restore) types.Restore
- func FillProcessStateForDump(next types.Dump) types.Dump
- func InheritFilesForRestore(next types.Restore) types.Restore
- func ReloadProcessStateForRestore(next types.Restore) types.Restore
- func SetPIDForDump(next types.Dump) types.Dump
Constants ¶
const STATE_FILE = "process_state.json"
Variables ¶
var ( Run types.Run = run Manage types.Run = manage )
Functions ¶
func AddExternalFilesForDump ¶
Detects any open files that are in an external namespace and sets appropriate options for CRIU. Also detects any TTY files and sets options for CRIU.
func CloseCommonFilesForDump ¶
Close common file descriptors b/w the parent and child process
func DetectIOUringForDump ¶
Detects if the process is using IOUring and sets appropriate options for CRIU XXX: Currently IO uring C/R is not supported by CRIU, so we return an error. ref: https://criu.org/Google_Summer_of_Code_Ideas#IOUring_support
func DetectShellJobForDump ¶
Detect and sets shell job option for CRIU
func DetectShellJobForRestore ¶
Detect and sets shell job option for CRIU
func FillProcessStateForDump ¶
Fills process state in the dump response. Requires at least the PID to be present in the DumpResp.State Also saves the state to a file in the dump directory, post dump.
func InheritFilesForRestore ¶
If req.Attachable is set, inherit fd is set to 0, 1, 2. assuming CRIU will be spawned with these set to appropriate files later on. If just req.Log is set, inherit fd is set only for 1, 2. stdin is not inherited. If these options are not set, it is assumed that these files still exist and the restore will just fail if they don't.
If a file is a TTY, restore will fail because there is no TTY to inherit.
If there were any external (namespace) files during dump, they are also added to be inherited. Note that this would still fail if the files don't exist.
func ReloadProcessStateForRestore ¶
Reload process state from the dump dir in the restore response
Types ¶
This section is empty.