diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2018-09-06 10:39:45 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-09-16 17:42:31 +0100 |
commit | f479764b34f997d27f591ddeb93d785f899534bb (patch) | |
tree | b40f2c7e7d1ccb353ab541f3dad80d3f8a984e07 /Src/zsh.h | |
parent | 301ca1229a6ca967f8bd7d3c379ff6b9983a3673 (diff) | |
download | zsh-f479764b34f997d27f591ddeb93d785f899534bb.tar.gz zsh-f479764b34f997d27f591ddeb93d785f899534bb.tar.xz zsh-f479764b34f997d27f591ddeb93d785f899534bb.zip |
43396: Job control debug.
Particularly for TTY ownership.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index b81db1527..b003b8ca2 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -3300,7 +3300,7 @@ typedef int convchar_t; #define MB_METASTRLEN2(str, widthp) ztrlen(str) #define MB_METASTRLEN2END(str, widthp, eptr) ztrlenend(str, eptr) -#define MB_CHARINIT() +#define MBT_CHARINIT() #define MB_CHARLENCONV(str, len, cp) charlenconv((str), (len), (cp)) #define MB_CHARLEN(str, len) ((len) ? 1 : 0) @@ -3311,3 +3311,26 @@ typedef int convchar_t; #define ZWS(s) s #endif /* MULTIBYTE_SUPPORT */ + + +/* Uncomment to debug problems with job control */ +/*#define DEBUG_JOB_CONTROL*/ + +#ifdef DEBUG_JOB_CONTROL +#define ATTACHTTY(pgrp, index) attachtty(pgrp, index) +void attachtty(pid_t pgrp, int index); + +#define SET_GLEADER(job, pid, index) set_gleader(job, pid, index) +void set_gleader(int job, int pid, int index); + +#define SETPGRP(pid, pgid, index) setpgrp_debug(pid, pgid, index) +int setpgrp_debug(int pid, int pgid, int index); +#else + +#define ATTACHTTY(pgrp, index) attachtty(pgrp) + +#define SET_GLEADER(job, pid, index) (jobtab[(job)].gleader = (pid)) +void attachtty(pid_t pgrp); + +#define SETPGRP(pid, pgid, index) setpgrp(pid, pgid) +#endif |