summaryrefslogtreecommitdiff
path: root/source/ap/ksh93/patches/ksh-20120801-filecomsubst.patch
blob: 6aa1fea91dbc941d764d825f03ed9d4ddcdfe032 (plain)
1
2
3
4
5
6
7
8
9
10
11
diff -up ksh-20120801/src/cmd/ksh93/sh/io.c.filecombsubst ksh-20120801/src/cmd/ksh93/sh/io.c
--- ksh-20120801/src/cmd/ksh93/sh/io.c.filecombsubst	2014-02-26 16:15:52.355391420 +0100
+++ ksh-20120801/src/cmd/ksh93/sh/io.c	2014-02-26 16:23:55.588148801 +0100
@@ -1326,6 +1326,7 @@ int	sh_redirect(Shell_t *shp,struct iono
 				if(flag==SH_SHOWME)
 					goto traceit;
 				fd=sh_chkopen(fname);
+				fd=sh_iomovefd(fd);
 			}
 			else if(sh_isoption(SH_RESTRICTED))
 				errormsg(SH_DICT,ERROR_exit(1),e_restricted,fname);