1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! A `(pid, ppid)` snapshot of every process on the host — the raw material the
//! tree-walk mechanism filters by identity. Per-OS backends reuse the same
//! infrastructure as `identity`: ToolHelp on Windows, `/proc` on Linux,
//! `proc_listallpids` on macOS. `sysinfo` is deliberately NOT used: its
//! 1-second start-time granularity is useless as an ordering key, and it pulls a
//! second major `windows` version.
use crateRawPid;
compile_error!;
/// A `(pid, ppid)` pair for every currently-listable process. Best-effort: a
/// process that vanishes mid-snapshot is simply absent. Only pid/ppid are read;
/// each candidate's high-res start token is resolved later via `ProcessId::of`.
///
/// # Errors
///
/// [`Error::Unassessable`](crate::error::Error::Unassessable) naming the cause when no trustworthy
/// snapshot can be taken ([`Error::Unsupported`](crate::error::Error::Unsupported) on Linux without
/// `openat2`). An empty `Ok` means the host has no processes: a walk over a failed snapshot would
/// find no descendants and skip every kill and wait.
pub use process_parents;
/// Every listable pid plus the `(pid, ppid)` edges plus the denied-ppid-read count, from one
/// enumeration (macOS only — the fd-marker sweep needs all three, consistently, so it cannot
/// disagree with the ppid-walk channel about the host).
pub
/// Test-only re-export of the macOS backend's blind-snapshot fault seam — `fdmarker_tests.rs`
/// (a different module) needs it to exercise `Marker::sweep`'s `incomplete`/`Err` path
/// end-to-end, and `backend` is private to this file.
pub
/// Test-only re-export of the backend's fault seams, for the tree-walk propagation tests.
pub use fault as backend_fault;