#include #include int tcsetpgrp(int fildes, pid_t pgrpid) { return ioctl(fildes, TIOCSPGRP, &pgrpid); }