Next: _stat_r, Previous: _kill_r, Up: Reentrant Syscalls [Contents][Index]

#### 13.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.