about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-03-31 09:54:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-03-31 09:54:54 +0000
commit38eb8ac2939949c99b30c13a819ef71851762422 (patch)
treebe3703e8afd1f5adf5eac44ddd0df0b301adcf36 /Src/zsh.h
parent60a22c7a25d2a77579b0b2342c439b994692c99c (diff)
downloadzsh-38eb8ac2939949c99b30c13a819ef71851762422.tar.gz
zsh-38eb8ac2939949c99b30c13a819ef71851762422.tar.xz
zsh-38eb8ac2939949c99b30c13a819ef71851762422.zip
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 0434fdb5e..b0ca94e09 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -254,6 +254,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              */