Skip to main content

detect

Function detect 

Source
pub fn detect(
    host_prog: &[u8],
    user_path: &[u8],
    guest_prog: &[u8],
    argv0: &[u8],
    is_elf: bool,
) -> Option<FrontEnd>
Expand description

Decides whether an exec is a nested launch, and in which dialect.

§Arguments

  • host_prog - Host path of the ELF about to run (after #! expansion).
  • user_path - Program path as the tracee passed it.
  • guest_prog - Canonical guest path of the program.
  • argv0 - The tracee’s argv[0], which selects the dialect as main does.
  • is_elf - The program is an ELF the tracee named directly, not a script.

§Returns

The dialect, or None for an ordinary exec.