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

Re: Any comment on file descriptor behavior in functions?



On Mar 22,  5:11pm, Bart Schaefer wrote:
}
} That's not it, or rather it's too much of it.  That also leaves open the
} xtrace output descriptor, etc.  The fix needs to be more specific.

I think it's as easy as this -- but I may have missed something, too:

Index: Src/exec.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/exec.c,v
retrieving revision 1.24
diff -c -r1.24 exec.c
--- Src/exec.c	18 Feb 2005 17:05:15 -0000	1.24
+++ Src/exec.c	22 Mar 2005 18:27:34 -0000
@@ -2415,7 +2415,7 @@
 
 		for (i = 10; i <= max_zsh_fd; i++)
 		    if (fdtable[i] > 1)
-			fdtable[i]++;
+			fdtable[i] += 2;
 #endif
 		if (subsh_close >= 0)
 		    zclose(subsh_close);



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