fix for incomplete multibyte characters in pasted input; fix for syntax errors while entering compound assignments; fix for jobs not removing jobs from the list in a SIGCHLD trap; fix for PS0 that contains a command substitution after interactive shell reads EOF; fix for non-interactive shell reading from stdin and evaling a command that dups stdin

This commit is contained in:
Chet Ramey
2023-05-04 11:19:43 -04:00
parent 23935dbe85
commit 896df2874a
16 changed files with 465 additions and 300 deletions
+1 -1
View File
@@ -359,7 +359,7 @@ duplicate_buffered_stream (int fd1, int fd2)
buffers[fd2]->b_flag |= B_WASBASHINPUT;
}
if (fd_is_bash_input (fd1) || (buffers[fd1] && (buffers[fd1]->b_flag & B_SHAREDBUF)))
if (buffers[fd2] && (fd_is_bash_input (fd1) || (buffers[fd1] && (buffers[fd1]->b_flag & B_SHAREDBUF))))
buffers[fd2]->b_flag |= B_SHAREDBUF;
return (fd2);