pub fn getpid() -> Pid
Get the pid of this process (see getpid(2)).
Since you are running code, there is always a pid to return, so there is no error case that needs to be handled.