summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-02-01 17:11:48 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2017-02-01 17:11:48 -0800
commitcaddeca1ac638137b26735fc8c63d08c83be6a90 (patch)
tree39add3800bfb2d044bcc28fd5762838114594825
parentad1b46578eb08415d6142aaf558ff5f59fa2e179 (diff)
downloadzsh-caddeca1ac638137b26735fc8c63d08c83be6a90.tar.gz
zsh-caddeca1ac638137b26735fc8c63d08c83be6a90.tar.xz
zsh-caddeca1ac638137b26735fc8c63d08c83be6a90.zip
40483 (cf. Eric Freese: 40482): Remove zpty exit hook from forked processes
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/zpty.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 10b06a9f1..2b9f8a762 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-01  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 40483 (cf. Eric Freese: 40482): Src/Modules/zpty.c: Remove zpty
+	exit hook from forked processes
+
 2017-02-01  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 40460: Src/params.c, Test/E01options.ztst: WARN_NESTED_VAR:
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 2c87be16f..3c1bef58f 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -331,6 +331,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock)
 	/* This code copied from the clone module, except for getting *
 	 * the descriptor from get_pty() and duplicating it to 0/1/2. */
 
+	deletehookfunc("exit", ptyhook);
 	clearjobtab(0);
 	ppid = getppid();
 	mypid = getpid();
@@ -852,6 +853,7 @@ bin_zpty(char *nam, char **args, Options ops, UNUSED(int func))
     }
 }
 
+/**/
 static int
 ptyhook(UNUSED(Hookdef d), UNUSED(void *dummy))
 {