Module child

Module child 

Source

Structs§

Supervisor
The main means of communication between the child and parent process, allowing the former to send requests and get info from the latter.
SvInitError
Marker representing that an error occurred during creation of the supervisor.

Statics§

SUPERVISOR 🔒
A handle to the single, shared supervisor process across all MiriMachines. Since it would be very difficult to trace multiple FFI calls in parallel, we need to ensure that either (a) only one MiriMachine is performing an FFI call at any given time, or (b) there are distinct supervisor and child processes for each machine. The former was chosen here.

Functions§

init_sv
Initialises the supervisor process. If this function errors, then the supervisor process could not be created successfully; else, the caller is now the child process and can communicate via do_ffi, receiving back events at the end.
register_retcode_sv
Instruct the supervisor process to return a particular code. Useful if for whatever reason this code fails to be intercepted normally.