Function systemd::login::get_machine_name [] [src]

pub fn get_machine_name(pid: Option<pid_t>) -> Result<String>

Determines the machine name of a process.

Specific processes can be optionally targeted via their PID. When no PID is specified, operation is executed for the calling process. This method can be used to retrieve the machine name of processes running inside a VM or a container.