Skip to main content

marker_value

Function marker_value 

Source
pub fn marker_value(
    mode: StartMode,
    own_pid: u32,
    own_identity: &str,
) -> OsString
Expand description

What: Build the marker value for a start by the process own_pid with birth identity own_identity. &str borrows the identity text; OsString is the owned value an environment holds. Why: One function writes the format and parse_marker reads it, so the two cannot drift apart.

In TS you’d write (pseudocode):

const value = [pid, identity, mode === 'replace' ? 'replace' : 'child'].join('\x1f');