Page 415, below line 13907, add: int tcsetsid(int, pid_t); Page 416, line 13924, add reference to tcgetsid(). Add new article for tcsetsid(): NAME tcsetsid - set the process group ID for the session leader for the controlling terminal SYNPOSIS #include int tcsetsid(int fildes, pid_t pid); DESCRIPTION The tcsetsid() function shall set the process ID of the session leader associated with the terminal to sid. The application shall ensure that the file associated with fildes is a terminal that is not already associated with a session leader. The application shall ensure that the value of pid matches the process ID of the calling process. This process must also be a session leader. RETURN VALUE Upon successful completion, 0 shall be returned. Otherwise, -1 shall be returned and errno set to indicate the error. ERRORS The tcsetsid() function shall fail if: [EBADF] The fildes argument is not a valid file descriptor. [ENOTTY] The file associated with fildes is not a terminal. [EPERM] The value of sid does not match the process ID of the calling process. RATIONALE By enforcing that pid must match the process ID of the calling process, this function can be implemented on top of the TIOCSCTTY ioctl() present in some implementations, while still permitting extensions in future versions of the standard. On implementations supporting the TIOCSCTTY ioctl(), the tcsetsid() function can simply be implemented as follows: #include int tcsetsid(int fildes, pid_t pid) { if (pid != getpid()) { errno = EPERM; return -1; } return ioctl(fildes, TIOCSCTTY); }