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

Re: [PATCH] Remove zpty exit hook from forked processes



On Feb 1,  1:41pm, Eric Freese wrote:
}
} diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c

If the only meaningful diff is this one ...

} +	deletehookfunc("exit", ptyhook);
}  	clearjobtab(0);

... then there is no reason to move around all those static functions.
Just mark the one to be declared in the autogenerated header file.


diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 2c87be1..3c1bef5 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))
 {



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