1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-24 17:00:32 +02:00

39436: Pass on status of SIGINT better.

Set lastval to 128 + SIGINT on interrupt.

Don't execute builtin if already interrupted at that point.
This commit is contained in:
Peter Stephenson 2016-09-25 19:18:43 +01:00
parent 759e5912fd
commit e35dcae40f
3 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2016-09-25 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 39436: Src/exec.c, Src/signals.c: Don't execute builtin if
interrupted; set lastval to 128 + SIGINT on interrupt.
* 39435: Src/exec.c: Don't set gleader of SUBJOB immediately if
SUPERJOB has no processes.

View file

@ -3701,7 +3701,8 @@ execcmd(Estate state, int input, int output, int how, int last1)
state->pc = opc;
}
dont_queue_signals();
lastval = execbuiltin(args, assigns, (Builtin) hn);
if (!errflag)
lastval = execbuiltin(args, assigns, (Builtin) hn);
if (do_save & BINF_COMMAND)
errflag &= ~ERRFLAG_ERROR;
restore_queue_signals(q);

View file

@ -646,6 +646,7 @@ zhandler(int sig)
inerrflush();
check_cursh_sig(SIGINT);
}
lastval = 128 + SIGINT;
}
break;