Expand description

Functionality common to both prepare and execute workers.

Modules§

  • Functionality for securing workers.
  • Functionality related to threads spawned by the workers.

Structs§

  • A wrapper around a file descriptor used to encapsulate and restrict functionality for pipe operations.

Enums§

Constants§

  • Some allowed overhead that we account for in the “CPU time monitor” thread’s sleeps, on the child process.

Functions§

  • Loop that runs in the CPU time monitor thread on prepare and execute jobs. Continuously wakes up and then either blocks for the remaining CPU time, or returns if we exceed the CPU timeout.
  • Calculate the total CPU time from the given usage structure, returned from [nix::sys::resource::getrusage], and calculates the total CPU time spent, including both user and system time.
  • Get a job response.
  • Initializes the worker process, then runs the given event loop, which spawns a new job process to securely handle each incoming request.
  • Attempt to convert an opaque panic payload to a string.