From fcf080ab578de00c799eb287ef8bdc201c313fee Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 18 Nov 2023 16:22:24 -0800 Subject: 52313: Src/exec.c: multios are not interactive and check for write errors. --- Src/exec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 97823760f..7d8135266 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2290,6 +2290,8 @@ closemn(struct multio **mfds, int fd, int type) return; } /* pid == 0 */ + opts[INTERACTIVE] = 0; + dont_queue_signals(); child_unblock(); closeallelse(mn); if (mn->rflag) { @@ -2302,7 +2304,8 @@ closemn(struct multio **mfds, int fd, int type) break; } 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 { /* cat process */ @@ -2314,7 +2317,8 @@ closemn(struct multio **mfds, int fd, int type) else break; } - write_loop(mn->pipe, buf, len); + if (write_loop(mn->pipe, buf, len) < 0) + break; } } _exit(0); -- cgit 1.4.1