Get the session ID of a process
#include <unistd.h> pid_t getsid( pid_t pid );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The getsid() function determines the session ID for the given process ID, pid.
The session ID, or -1 if an error occurs (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |