MCPcopy Create free account
hub / github.com/bootc-dev/bootc / require_host_pidns

Function require_host_pidns

crates/lib/src/install.rs:1445–1451  ·  view source on GitHub ↗

A heuristic check that we were invoked with --pid=host

()

Source from the content-addressed store, hash-verified

1443
1444/// A heuristic check that we were invoked with --pid=host
1445fn require_host_pidns() -> Result<()> {
1446 if rustix::process::getpid().is_init() {
1447 anyhow::bail!("This command must be run with the podman --pid=host flag")
1448 }
1449 tracing::trace!("OK: we're not pid 1");
1450 Ok(())
1451}
1452
1453/// Verify that we can access /proc/1, which will catch rootless podman (with --pid=host)
1454/// for example.

Callers 1

prepare_installFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected