From 551ff842721d6ca83727dbe6cd40178f46cc8201 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sun, 16 Sep 2018 19:13:38 +0100
Subject: 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.
---
Src/utils.c | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'Src/utils.c')
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;
+ }
}
}
--
cgit 1.4.1