process

package
v0.9.245 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const STATE_FILE = "process_state.json"

Variables

View Source
var (
	Run    types.Run = run
	Manage types.Run = manage
)

Functions

func AddExternalFilesForDump

func AddExternalFilesForDump(next types.Dump) types.Dump

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

func CloseCommonFilesForDump(next types.Dump) types.Dump

Close common file descriptors b/w the parent and child process

func DetectIOUringForDump

func DetectIOUringForDump(next types.Dump) types.Dump

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

func DetectShellJobForDump(next types.Dump) types.Dump

Detect and sets shell job option for CRIU

func DetectShellJobForRestore

func DetectShellJobForRestore(next types.Restore) types.Restore

Detect and sets shell job option for CRIU

func FillProcessStateForDump

func FillProcessStateForDump(next types.Dump) types.Dump

Fills process state in the dump response.

func InheritFilesForRestore

func InheritFilesForRestore(next types.Restore) types.Restore

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

func ReloadProcessStateForRestore(next types.Restore) types.Restore

Reload process state from the dump dir in the restore response

func SaveProcessStateForDump added in v0.9.244

func SaveProcessStateForDump(next types.Dump) types.Dump

Saves process state in the dump directory.

func SetPIDForDump

func SetPIDForDump(next types.Dump) types.Dump

Sets the PID from the request to the process state if not already set before.

func WritePIDFile added in v0.9.243

func WritePIDFile(next types.Run) types.Run

Adapter that writes PID to a file after the next handler is called.

func WritePIDFileForRestore added in v0.9.243

func WritePIDFileForRestore(next types.Restore) types.Restore

Adapter that writes PID to a file after the next handler is called.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL