|GETSID(2)||Linux Programmer's Manual||GETSID(2)|
pid_t getsid(pid_t pid);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
_XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
- A process with process ID pid exists, but it is not in the same session as the calling process, and the implementation considers this an error.
- No process with process ID pid was found.
See credentials(7) for a description of sessions and session IDs.