about summary refs log tree commit diff
path: root/Src/init.c
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/init.c
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/init.c')
-rw-r--r--Src/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/init.c b/Src/init.c
index 26f5fb06f..903df47cd 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1048,7 +1048,7 @@ source(char *s)
 	freeeprog(prog);
     else {
 	fclose(bshin);
-	fdtable[SHIN] = 0;
+	fdtable[SHIN] = FDT_UNUSED;
 	SHIN = fd;		     /* the shell input fd                   */
 	bshin = obshin;		     /* file handle for buffered shell input */
     }
@@ -1252,7 +1252,7 @@ zsh_main(UNUSED(int argc), char **argv)
     } while (zsh_name);
 
     fdtable_size = zopenmax();
-    fdtable = zshcalloc(fdtable_size);
+    fdtable = zshcalloc(fdtable_size*sizeof(*fdtable));
 
     createoptiontable();
     emulate(zsh_name, 1);   /* initialises most options */