Lines Matching refs:pgrp
1715 * -1: leave tty alone; inherit pgrp from parent
1726 pid_t pgrp;
1771 pgrp = pcurrjob ? pcurrjob->p_jobid : getpid();
1804 pgetty(wanttty, pgrp);
1845 pgrp = pcurrjob ? pcurrjob->p_jobid : pid;
1846 if (setpgid(pid, pgrp) == -1 && errno == EPERM) {
1852 (void) setpgid(pid, pgrp = pid);
1897 setttypgrp(int pgrp)
1904 * pgrp ourselves. If that happens, then the process will be still
1912 if (tcgetpgrp(FSHTTY) != pgrp) {
1923 (void) tcsetpgrp(FSHTTY, pgrp);
1941 pgetty(int wanttty, pid_t pgrp)
1948 jobdebug_xprintf(("wanttty %d pid %d opgrp%d pgrp %d tpgrp %d\n",
1949 wanttty, (int)getpid(), (int)pgrp, (int)mygetpgrp(),
1967 setttypgrp(pgrp);
1977 if (setpgid(0, pgrp) == -1) {
1980 if (setpgid(0, pgrp = getpid()) == -1) {
1986 wanttty = pgrp; /* Now we really want the tty, since we became the
1995 setttypgrp(pgrp);
2000 jobdebug_xprintf(("wanttty %d pid %d pgrp %d tpgrp %d\n",