Skip to main content

parent_pid

Function parent_pid 

Source
pub fn parent_pid() -> Result<Option<u32>>
Expand description

Reads ASTRS_RUN_PARENT_PID, when it is set (§4.2).

§Errors

NodeError::BadEnv when it is set to something that is not a process id.

§Examples

// Unset in an ordinary test process, so no guard is requested.
assert!(astrs_node_api::env::parent_pid().is_ok());