1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-28 16:15:02 +01:00

Yet more debug info.

This commit is contained in:
Peter Stephenson 2018-09-07 13:42:01 +01:00 committed by Peter Stephenson
parent b470d6fa70
commit f8c02f3856
2 changed files with 6 additions and 7 deletions

View file

@ -1050,13 +1050,7 @@ entersubsh(int flags, struct entersubsh_ret *retp)
SETPGRP(0L, jobtab[list_pipe_job].gleader, 2);
if (!(flags & ESUB_ASYNC))
ATTACHTTY(jobtab[thisjob].gleader, 2);
} else if (gettygrp() == GETPGRP()) {
/*
* There are races where if the process is attached
* to the terminal blocking SIGTTOU causes errors.
* So just leave signals alone.
*/
/* job_control_ok = 1;*/ /* Probably not a * fix */
} else {
#ifdef DEBUG_JOB_CONTROL
fprintf(stderr, "pid = %d, gleader = %d, pgrp = %d, list_pipe_child = %d, mypgrp = %d\n",
getpid(), jobtab[list_pipe_job].gleader,

View file

@ -540,6 +540,11 @@ wait_for_processes(void)
if (WIFEXITED(status) &&
pn->pid == jn->gleader &&
killpg(pn->pid, 0) == -1) {
#ifdef DEBUG_JOB_CONTROL
fprintf(stderr, "pid %d exited in control of TTY\n",
pn->pid);
fflush(stderr);
#endif
SET_GLEADER(jn-jobtab, 0, 11);
if (!(jn->stat & STAT_NOSTTY)) {
/*