diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2018-09-07 11:16:23 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2018-09-07 12:10:23 +0100 |
commit | 0616ab05b795ffedb746799fe1b44a80d20e8505 (patch) | |
tree | dfcb1cbf90e79ca279418c98eace34e2e855aa1b /Src/utils.c | |
parent | b8918c8241973fc9c0c1690e7ba471ec1f73d42f (diff) | |
download | zsh-0616ab05b795ffedb746799fe1b44a80d20e8505.tar.gz zsh-0616ab05b795ffedb746799fe1b44a80d20e8505.tar.xz zsh-0616ab05b795ffedb746799fe1b44a80d20e8505.zip |
Add some more debug.
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Src/utils.c b/Src/utils.c index 42f6ab773..342e31f53 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -4651,8 +4651,9 @@ attachtty(pid_t pgrp if (jobbing && interact) { #ifdef DEBUG_JOB_CONTROL - fprintf(stderr, "attachtty(%d): pgrp = %d, mypgrp = %d\n", - index, pgrp, mypgrp); + fprintf(stderr, "attachtty(%d): pgrp = %d, mypgrp = %d, curpid = %d\n", + index, pgrp, mypgrp, getpid()); + fflush(stderr); #endif #ifdef HAVE_TCSETPGRP if (SHTTY != -1 && tcsetpgrp(SHTTY, pgrp) == -1 && !ep) @@ -4668,6 +4669,7 @@ attachtty(pid_t pgrp { #ifdef DEBUG_JOB_CONTROL fprintf(stderr, "attachtty failed\n"); + fflush(stderr); #endif if (pgrp != mypgrp && kill(-pgrp, 0) == -1) ATTACHTTY(mypgrp, 16); @@ -4690,15 +4692,9 @@ attachtty(pid_t pgrp void set_gleader(int job, int pid, int index) { jobtab[job].gleader = pid; - fprintf(stderr, "set_gleader(%d): %d = %d\n", index, job, pid); -} - -int setpgrp_debug(int pid, int pgid, int index) -{ - int ret = setpgrp(pid, pgid); - fprintf(stderr, "setpgrp(%d): pid %d, pgid %d, current pid %d, ret %d\n", - index, pid, pgid, getpid(), ret); - return ret; + fprintf(stderr, "set_gleader(%d): %d = %d, curpid = %d\n", index, job, pid, + getpid()); + fflush(stderr); } /**/ |