From ddb86759012992fa6471bd738f906a4ed434b69f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 15 Aug 2017 20:49:23 +0100 Subject: posted but has not shown up: fix fd problem in subshell. Record fd's that have been saved in fdtable and if the shell forks close them as they will never be restored. --- Src/zsh.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Src/zsh.h') diff --git a/Src/zsh.h b/Src/zsh.h index ccd11db3d..91e8d7f8c 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -456,6 +456,18 @@ enum { #define FDT_PROC_SUBST 7 #endif +/* + * Mask to get the basic FDT type. + */ +#define FDT_TYPE_MASK 15 + +/* + * Bit flag that fd is saved for later restoration. + * Currently this is only use with FDT_INTERNAL. We use this fact so as + * not to have to mask checks against other types. + */ +#define FDT_SAVED_MASK 16 + /* Flags for input stack */ #define INP_FREE (1<<0) /* current buffer can be free'd */ #define INP_ALIAS (1<<1) /* expanding alias or history */ -- cgit v1.2.3