Lines Matching defs:pgrp
56 #define JP_PGRP 4 /* print pgrp */
67 #define JF_FG 0x010 /* running in foreground (also has tty pgrp) */
83 pid_t pgrp; /* process group of job */
235 /* Restore tty and pgrp. */
257 /* Back from suspend, reset signals, pgrp and tty. */
291 if (j->pgrp == 0)
294 mksh_killpg(j->pgrp, SIGHUP);
297 if (j->pgrp == 0)
300 mksh_killpg(j->pgrp, SIGCONT);
312 * Need to restore the tty pgrp to what it was when the
489 j->pgrp = 0;
528 if (j->pgrp == 0) {
530 j->pgrp = p->pid;
535 * set pgrp in both parent and child to deal with race
538 setpgid(p->pid, j->pgrp);
540 tcsetpgrp(tty_fd, j->pgrp);
781 if (j->pgrp == 0) {
790 mksh_killpg(j->pgrp, SIGCONT);
792 if (mksh_killpg(j->pgrp, sig) < 0) {
824 if (j->pgrp == 0) {
860 j->saved_ttypgrp : j->pgrp) < 0) {
868 j->saved_ttypgrp : j->pgrp), "failed",
879 if (j->state == PRUNNING && mksh_killpg(j->pgrp, SIGCONT) < 0) {
938 /* 0: short, 1: long, 2: pgrp */
1162 if (Flag(FMONITOR) && ttypgrp_ok && j->pgrp) {
1164 * Save the tty's current pgrp so it can be restored
1169 * pgrp, so naturally it sets its pgrp and gets hosed
1171 * has restored the tty's pgrp to that of the su
1542 shf_fprintf(shf, "%d\n", (int)(j->pgrp ? j->pgrp :
1658 if (j->pgrp && j->pgrp == job)