Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: can't set tty pgrp



On Thu, 19 Apr 2018 06:57:40 -0400
Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
> The process group changes seem to have broken something:
> 
> 
> : ~ Thu 19 6:52; vi
> ^Z
> zsh: suspended  vi
> : ~ Thu 19 6:52; fg
> [1]  + continued  vi
> zsh: can't set tty pgrp: no such process

Yep, I remember thinking about this and forgetting to do anything...

The following looks like it ought to be safe.

diff --git a/Src/signals.c b/Src/signals.c
index 2a6aa3f..6e12158 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -537,7 +537,8 @@ wait_for_processes(void)
 #else
 		update_process(pn, status);
 #endif
-		if (pn->pid == jn->gleader) {
+		if (WIFEXITED(status) &&
+		    pn->pid == jn->gleader) {
 		    jn->gleader = 0;
 		    if (!(jn->stat & STAT_NOSTTY)) {
 			/*


pws



Messages sorted by: Reverse Date, Date, Thread, Author