components/ksh93/patches/230-18229654.patch
changeset 5129 5431772f7235
parent 4268 d723f8ed85fe
equal deleted inserted replaced
5128:218234c0062c 5129:5431772f7235
       
     1 This fix is from the community, details in the following location.
       
     2 http://lists.research.att.com/pipermail/ast-developers/2014q1/003846.html
       
     3 ---
       
     4 --- a/src/cmd/ksh93/bltins/alarm.c_org	Tue Mar 25 13:42:56 2014
       
     5 +++ b/src/cmd/ksh93/bltins/alarm.c	Tue Mar 25 13:43:07 2014
       
     6 @@ -122,7 +122,7 @@
       
     7  		tp->timeout = 0;
       
     8  	tp->flags |= L_FLAG;
       
     9  	tp->sh->sigflag[SIGALRM] |= SH_SIGALRM;
       
    10 -	if(sh_isstate(SH_TTYWAIT))
       
    11 +	if(sh_isstate(SH_TTYWAIT) && !tp->sh->bltinfun)
       
    12  		sh_timetraps(tp->sh);
       
    13  }
       
    14  
       
    15 --- a/src/cmd/ksh93/sh/xec.c_org	Tue Mar 25 13:46:48 2014
       
    16 +++ b/src/cmd/ksh93/sh/xec.c	Tue Mar 25 13:48:18 2014
       
    17 @@ -2720,6 +2720,11 @@
       
    18  			break;
       
    19  		    }
       
    20  		}
       
    21 +		if(shp->trapnote&SH_SIGALRM)
       
    22 +		{
       
    23 +			shp->trapnote &= ~SH_SIGALRM;
       
    24 +			sh_timetraps(shp);
       
    25 +		}
       
    26  		if(shp->trapnote || (shp->exitval && sh_isstate(SH_ERREXIT)) &&
       
    27  			t && echeck) 
       
    28  			sh_chktrap(shp);