| [EBADF] |
| | The fd argument is not a valid file descriptor. |
| [EINVAL] |
| | An invalid value of pgrp_id was specified. |
| [ENOTTY] |
| | The calling process does not have a controlling terminal, or the file represented by fd is not the controlling terminal, or the controlling terminal is no longer associated with the session of the calling process. |
| [EPERM] |
| | The pgrp_id argument does not match the process group ID of a process in the same session as the calling process. |
|