diff --git a/src/cmd/ksh93/bltins/alarm.c b/src/cmd/ksh93/bltins/alarm.c index 5d152cc16..40e008776 100644 --- a/src/cmd/ksh93/bltins/alarm.c +++ b/src/cmd/ksh93/bltins/alarm.c @@ -34,8 +34,6 @@ * > happen is that the trap is marked for execution (sh_trapnote) and run after * > the current command completes. The time trap should wake up the shell if * > it is blocked and it should return and then handle the trap. - * - * When that is done, the save_ifstable workaround can probably be removed. */ #include "defs.h" @@ -153,12 +151,7 @@ void sh_timetraps(Shell_t *shp) { tp->flags &= ~L_FLAG; if(tp->action) - { - char save_ifstable[256]; - memcpy(save_ifstable,shp->ifstable,sizeof(save_ifstable)); sh_fun(tp->action,tp->node,(char**)0); - memcpy(shp->ifstable,save_ifstable,sizeof(save_ifstable)); - } tp->flags &= ~L_FLAG; if(!tp->flags) { diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index ebbb94aaf..861a65aea 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -996,11 +996,11 @@ done 3< <(builtin) if (builtin alarm) 2>/dev/null then got=$( { "$SHELL" -c ' builtin alarm - alarm -r alarm_handler +.001 + alarm -r alarm_handler +.005 i=0 function alarm_handler.alarm { - let "(++i) > 100" && exit + let "(++i) > 20" && exit } while :; do echo cargo,odds and ends,jetsam,junk,wreckage,castoffs,sea-drift