summaryrefslogtreecommitdiff
path: root/source/ap/ksh93/patches/ksh-20120801-diskfull.patch
blob: 9d68d9350ab1bd009e3226c8988befa9648bce5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ksh-20120801/src/cmd/ksh93/sh/main.c	2015-04-17 16:55:57.802048900 -0300
+++ ksh-20120801/src/cmd/ksh93/sh/main.c	2015-04-17 17:10:45.276129709 -0300
@@ -423,7 +423,7 @@ static void	exfile(register Shell_t *shp
 		sfsync(shp->outpool);
 		shp->st.execbrk = shp->st.breakcnt = 0;
 		/* check for return from profile or env file */
-		if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT))
+		if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT || jmpval==SH_JMPERREXIT))
 		{
 			sh_setstate(states);
 			goto done;
@@ -600,6 +600,8 @@ done:
 		siglongjmp(*shp->jmplist,jmpval);
 	else if(jmpval == SH_JMPEXIT)
 		sh_done(shp,0);
+	else if(jmpval == SH_JMPERREXIT)
+		sh_done(shp,-1);
 	if(fno>0)
 		sh_close(fno);
 	if(shp->st.filename)