summaryrefslogtreecommitdiff
path: root/init/src/pid_one.rs
blob: 84cca4724bec643f0a29d60b1f5d30feaf322f87 (plain)
1
2
3
4
5
6
7
8
9
10
use std::process::id;

pub fn check_pid() -> Result<(), Box<dyn std::error::Error>> {
    let pid = id();

    match pid {
        1 => Ok(()),
        _ => Err("Runned not as first process.".into()),
    }
}