fix issue with redirections to bash input file descriptor; new minimal chmod builtin; posix mode change for kill builtin return status; perform additional validation on brace expansion sequence expressions

This commit is contained in:
Chet Ramey
2025-02-12 11:18:16 -05:00
parent 3cfc255efe
commit c3ca11424d
13 changed files with 403 additions and 44 deletions
+6 -1
View File
@@ -302,10 +302,15 @@ save_bash_input (int fd, int new_fd)
int
check_bash_input (int fd)
{
int nfd;
if (fd_is_bash_input (fd))
{
if (fd > 0)
return ((save_bash_input (fd, -1) == -1) ? -1 : 0);
{
nfd = save_bash_input (fd, -1); /* allocates new fd */
return (nfd);
}
else if (fd == 0)
return ((sync_buffered_stream (fd) == -1) ? -1 : 0);
}