Skip to main content

fake_proc_file

Function fake_proc_file 

Source
fn fake_proc_file(r: &Req<'_>, host: &[u8], fd: i32) -> Result<Option<i32>, i32>
Expand description

Serves an opened /proc/<pid>/status or cmdline from a rewritten copy.

§Arguments

  • host - Host path of the opened file, which tells which it is.
  • fd - The open descriptor, read and left at its start when no copy is made.

§Returns

A descriptor on the copy, or None when the file is neither or needs no rewrite.