fix for a trap on SIGINT restoring the default disposition in an asynchronous subshell; change cd exit status if -Pe supplied and the directory can't be changed; fix for compound associative array assignment if one of the expanded words unsets the array during word expansion; fixes for rare systems that don't have various defines and system calls

This commit is contained in:
Chet Ramey
2025-11-17 14:50:43 -05:00
parent 81d8584268
commit 2fd02c8387
13 changed files with 113 additions and 62 deletions
+2 -2
View File
@@ -1654,7 +1654,7 @@ open_shell_script (char *script_name)
#endif
/* Only do this with non-tty file descriptors we can seek on. */
if (fd_is_tty == 0 && (lseek (fd, 0L, 1) != -1))
if (fd_is_tty == 0 && (lseek (fd, 0L, SEEK_CUR) != -1))
{
/* Check to see if the `file' in `bash file' is a binary file
according to the same tests done by execute_simple_command (),
@@ -1691,7 +1691,7 @@ open_shell_script (char *script_name)
exit (EX_BINARY_FILE);
}
/* Now rewind the file back to the beginning. */
lseek (fd, 0L, 0);
lseek (fd, 0L, SEEK_SET);
}
/* Open the script. But try to move the file descriptor to a randomly