components/ksh93/patches/Bug15794787,15819673.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 31 Jul 2014 12:01:39 -0700
branchs11-update
changeset 3243 1359280d9099
parent 2524 f112164dd16d
permissions -rw-r--r--
19000542 tcsh represents garbled letters to standard error after installing SRU17.5 18590021 array name doesn't support multi-byte characters in tcsh
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2524
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     1
--- a/src/cmd/ksh93/sh/xec.c	Thu Nov 29 22:06:17 2012
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     2
+++ b/src/cmd/ksh93/sh/xec.c	Fri Nov 30 00:45:30 2012
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     3
@@ -540,8 +540,10 @@
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     4
 	static Sfio_t *io_save;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     5
 	volatile int traceon=0, lineno=0;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     6
 	int binscript=shp->binscript;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     7
+	char comsub = shp->comsub;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     8
 	io_save = iop; /* preserve correct value across longjmp */
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
     9
 	shp->binscript = 0;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    10
+	shp->comsub = 0;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    11
 #define SH_TOPFUN	0x8000	/* this is a temporary tksh hack */
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    12
 	if (mode & SH_TOPFUN)
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    13
 	{
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    14
@@ -581,6 +583,7 @@
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    15
 	}
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    16
 	sh_popcontext(shp,&buff);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    17
 	shp->binscript = binscript;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    18
+	shp->comsub = comsub;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    19
 	if(traceon)
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    20
 		sh_onoption(SH_XTRACE);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    21
 	if(lineno)
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    22
@@ -3281,7 +3284,8 @@
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    23
 	struct funenv fun;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    24
 	char *fname = nv_getval(SH_FUNNAMENOD);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    25
 	struct Level	*lp =(struct Level*)(SH_LEVELNOD->nvfun);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    26
-	int		level, pipepid=shp->pipepid;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    27
+	int		level, pipepid=shp->pipepid, comsub=shp->comsub;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    28
+	shp->comsub = 0;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    29
 	shp->pipepid = 0;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    30
 	sh_stats(STAT_FUNCT);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    31
 	if(!lp->hdr.disc)
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    32
@@ -3323,6 +3327,7 @@
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    33
 	lp->maxlevel = level;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    34
 	SH_LEVELNOD->nvalue.s = lp->maxlevel;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    35
 	shp->last_root = nv_dict(DOTSHNOD);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    36
+	shp->comsub = comsub;
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    37
 #if 0
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    38
 	nv_putval(SH_FUNNAMENOD,shp->st.funname,NV_NOFREE);
f112164dd16d 15794787 SUNBT7172653 ksh93 hangs when passing a 20481-byte file through pipe
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff changeset
    39
 #else