- fd is not a valid file descriptor.
- pgrp has an unsupported value.
- The calling process does not have a controlling terminal, or it has one but it is not described by fd, or, for tcsetpgrp(), this controlling terminal is no longer associated with the session of the calling process.
- pgrp has a supported value, but is not the process group ID of a process in the same session as the calling process.
|tcgetpgrp (), tcsetpgrp ()||Thread safety||MT-Safe|