about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2018-09-16 19:13:38 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2018-09-16 19:13:38 +0100
commit551ff842721d6ca83727dbe6cd40178f46cc8201 (patch)
tree88fcee0886f87535240a527de45c41fc99de6662 /Src/utils.c
parent301ca1229a6ca967f8bd7d3c379ff6b9983a3673 (diff)
downloadzsh-551ff842721d6ca83727dbe6cd40178f46cc8201.tar.gz
zsh-551ff842721d6ca83727dbe6cd40178f46cc8201.tar.xz
zsh-551ff842721d6ca83727dbe6cd40178f46cc8201.zip
43464: Another attachtty() fix.
If list_pipe_job triggered more than once we need to know
the most recent process group leader, so record that
both if the attach happened in the main shell on in
entersubsh().

Also don't pass back proocess group for ESUB_ASYNC subshells.
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 075d27241..5a9fbdd32 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -4670,6 +4670,10 @@ attachtty(pid_t pgrp)
 		ep = 1;
 	    }
 	}
+	else
+	{
+	    last_attached_pgrp = pgrp;
+	}
     }
 }