Lines Matching defs:pgrp
111 #define JP_PGRP 4 /* print pgrp */
122 #define JF_FG 0x010 /* running in foreground (also has tty pgrp) */
138 pid_t pgrp; /* process group of job */
292 if (j->pgrp == 0)
295 killpg(j->pgrp, SIGHUP);
298 if (j->pgrp == 0)
301 killpg(j->pgrp, SIGCONT);
313 /* Need to restore the tty pgrp to what it was when the
486 j->pgrp = 0;
543 if (j->pgrp == 0) { /* First process */
553 if (j->pgrp == 0) { /* First process */
554 j->pgrp = p->pid;
558 /* set pgrp in both parent and child to deal with race
561 setpgid(p->pid, j->pgrp);
565 tcsetpgrp(tty_fd, j->pgrp);
569 tcsetpgrp(tty_fd, j->pgrp);
646 tcsetpgrp(tty_fd, j->pgrp);
790 if (j->pgrp == 0) { /* started when !Flag(FMONITOR) */
798 (void) killpg(j->pgrp, SIGCONT);
800 if (killpg(j->pgrp, sig) < 0) {
833 if (j->pgrp == 0) {
867 if (ttypgrp_ok && tcsetpgrp(tty_fd, (j->flags & JF_SAVEDTTYPGRP) ? j->saved_ttypgrp : j->pgrp) < 0) {
874 tty_fd, (int) ((j->flags & JF_SAVEDTTYPGRP) ? j->saved_ttypgrp : j->pgrp), strerror(errno));
885 if (j->state == PRUNNING && killpg(j->pgrp, SIGCONT) < 0) {
951 int slp; /* 0: short, 1: long, 2: pgrp */
1151 if (Flag(FMONITOR) && ttypgrp_ok && j->pgrp) {
1153 * Save the tty's current pgrp so it can be restored
1158 * pgrp, so naturally it sets its pgrp and gets hosed
1160 * has restored the tty's pgrp to that of the su
1450 shf_fprintf(shf, "%d\n", j->pgrp ? j->pgrp
1560 if (j->pgrp && j->pgrp == job)