Implements platform independent getpid() method and replaces LIBC.getpid() calls.