about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-04-23 04:20:22 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-04-23 04:20:22 +0000
commiteaf13e9eabfc0531d6e3dedc090f0f495c8139d4 (patch)
tree3d0fc83c6414b476099c0c572f11cc69b73b21b6 /Src/zsh.h
parentf355b42e167ab7e2263c23f52a237a6706b610b6 (diff)
downloadzsh-eaf13e9eabfc0531d6e3dedc090f0f495c8139d4.tar.gz
zsh-eaf13e9eabfc0531d6e3dedc090f0f495c8139d4.tar.xz
zsh-eaf13e9eabfc0531d6e3dedc090f0f495c8139d4.zip
Merge of 21049: Don't close process substitution file descriptors for external programmes
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index cb2e0cbb2..813d96364 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -262,6 +262,32 @@ enum {
 #define IS_READFD(X)          (((X)>=REDIR_READWRITE && (X)<=REDIR_MERGEIN) || (X)==REDIR_INPIPE)
 #define IS_REDIROP(X)         ((X)>=OUTANG && (X)<=TRINANG)
 
+/*
+ * Values for the fdtable array.  They say under what circumstances
+ * the fd will be close.  The fdtable is an unsigned char, so these are
+ * #define's rather than an enum.
+ */
+/* Entry not used. */
+#define FDT_UNUSED		0
+/*
+ * Entry used internally by the shell, should not be visible to other
+ * processes.
+ */
+#define FDT_INTERNAL		1
+/*
+ * Entry used by output from the XTRACE option.
+ */
+#define FDT_XTRACE		2
+#ifdef PATH_DEV_FD
+/*
+ * Entry used by a process substition.
+ * The value will be incremented on entering a function and
+ * decremented on exit; we don't close entries greater than
+ * FDT_PROC_SUBST except when closing everything.
+ */
+#define FDT_PROC_SUBST		3
+#endif
+
 /* Flags for input stack */
 #define INP_FREE      (1<<0)	/* current buffer can be free'd            */
 #define INP_ALIAS     (1<<1)	/* expanding alias or history              */