1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

Merge of 21391: only pass SIGINT and SIGQUIT from foreground processes to the shell.

This commit is contained in:
Paul Ackersviller 2007-05-06 03:45:24 +00:00
parent 2ef304d6f3
commit 3ec2e5f38f

View file

@ -383,7 +383,8 @@ update_job(Job jn)
}
/* If we have `foo|while true; (( x++ )); done', and hit
* ^C, we have to stop the loop, too. */
if ((val & 0200) && inforeground == 1) {
if ((val & 0200) && inforeground == 1 &&
((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) {
if (!errbrk_saved) {
errbrk_saved = 1;
prev_breaks = breaks;
@ -399,7 +400,8 @@ update_job(Job jn)
adjustwinsize(0);
}
}
} else if (list_pipe && (val & 0200) && inforeground == 1) {
} else if (list_pipe && (val & 0200) && inforeground == 1 &&
((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) {
if (!errbrk_saved) {
errbrk_saved = 1;
prev_breaks = breaks;