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 SaveProcessStateForDump(next types.Dump) types.Dump
- func SetPIDForDump(next types.Dump) types.Dump
- func WritePIDFile(next types.Run) types.Run
- func WritePIDFileForRestore(next types.Restore) types.Restore
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.
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
func SaveProcessStateForDump ¶ added in v0.9.244
Saves process state in the dump directory.
func SetPIDForDump ¶
Sets the PID from the request to the process state if not already set before.
func WritePIDFile ¶ added in v0.9.243
Adapter that writes PID to a file after the next handler is called.
Types ¶
This section is empty.