native: refactor getpid calls
native: internal getpid syscall
Merge pull request #1145 from LudwigOrtmann/native_refactor_getpid

native: refactor getpid calls