mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-09 06:28:06 +02:00
52313: Src/exec.c: multios are not interactive and check for write errors.
This commit is contained in:
parent
e32da86111
commit
fcf080ab57
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2023-11-18 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 52313: Src/exec.c: subshells implementing multio reads/writes
|
||||||
|
are not interactive and should check for write errors.
|
||||||
|
|
||||||
2023-11-17 Oliver Kiddle <opk@zsh.org>
|
2023-11-17 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
* 52307: Completion/Linux/Command/_selinux,
|
* 52307: Completion/Linux/Command/_selinux,
|
||||||
|
|
|
@ -2290,6 +2290,8 @@ closemn(struct multio **mfds, int fd, int type)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* pid == 0 */
|
/* pid == 0 */
|
||||||
|
opts[INTERACTIVE] = 0;
|
||||||
|
dont_queue_signals();
|
||||||
child_unblock();
|
child_unblock();
|
||||||
closeallelse(mn);
|
closeallelse(mn);
|
||||||
if (mn->rflag) {
|
if (mn->rflag) {
|
||||||
|
@ -2302,7 +2304,8 @@ closemn(struct multio **mfds, int fd, int type)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (i = 0; i < mn->ct; i++)
|
for (i = 0; i < mn->ct; i++)
|
||||||
write_loop(mn->fds[i], buf, len);
|
if (write_loop(mn->fds[i], buf, len) < 0)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* cat process */
|
/* cat process */
|
||||||
|
@ -2314,7 +2317,8 @@ closemn(struct multio **mfds, int fd, int type)
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
write_loop(mn->pipe, buf, len);
|
if (write_loop(mn->pipe, buf, len) < 0)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_exit(0);
|
_exit(0);
|
||||||
|
|
Loading…
Reference in a new issue