Next: _kill_r, Previous: _fstat_r, Up: Reentrant Syscalls

#### 12.2.12 `_getpid_r`—Reentrant version of getpid

Synopsis

         #include <reent.h>
         int _getpid_r(struct _reent *ptr);

Description
This is a reentrant version of `getpid`. It takes a pointer to the global data block, which holds `errno`.

We never need `errno`, of course, but for consistency we still must have the reentrant pointer argument.