Skip to main content

plan_first_trapped

Function plan_first_trapped 

Source
pub fn plan_first_trapped(
    ctx: &Ctx,
    pid: i32,
    path: &[u8],
    argv: Vec<Vec<u8>>,
    env: Vec<(Vec<u8>, Vec<u8>)>,
) -> Result<(), i32>
Expand description

Plans the first tracee’s exec in the guest-stub restricted mode, which the supervisor itself sets up rather than a stub: the tracee execs the trampoline through the allow gate with the mailbox it inherited.

§Arguments

  • ctx - Shared supervisor state.
  • pid - The first tracee, registered in the process table.
  • path - The command as given.
  • argv - Its argument vector.
  • env - Its environment, as names and values.

§Errors

The errno the exec would have failed with.