doc/{bash.1,bashref.texi}
- update aliases description based on a bug-bash discussion
- update description of word splitting behavior when IFS is unset
+
+builtins/evalfile.c
+ - _evalfile: if reading the entire file doesn't return the same
+ number of bytes as requested (the file size), treat this as a read
+ error
+
+ 2/21
+ ----
+parse.y
+ - yylex: if read_token returns < 0, return YYEOF if EOF_Reached = 1.
+ Don't return yacc_EOF because that allows commands to be executed.
+ - grammar: add a production to handle YYEOF, treating it the same as
+ yacc_EOF. Based on a report from
+ Eduardo A. Bustamante López <dualbus@gmail.com>
+
+jobs.c
+ - wait_for: if we're checking for window size changes, allow checks
+ during trap commands while readline is active or `bind -x' command
+ execution. Fix from Koichi Murase <myoga.murase@gmail.com>
(*errfunc) (_("%s: file is too large"), filename);
close (fd);
return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
- }
+ }
if (S_ISREG (finfo.st_mode) && file_size <= SSIZE_MAX)
{
nr = read (fd, string, file_size);
if (nr >= 0)
string[nr] = '\0';
+ if (nr != file_size)
+ nr = -1; /* XXX - didn't get the whole file */
}
else
nr = zmapfd (fd, &string, 0);
else
#if defined (READLINE)
/* We don't want to do this if we are running a process during
- programmable completion or a command bound to `bind -x'. */
- if (RL_ISSTATE (RL_STATE_COMPLETING|RL_STATE_DISPATCHING|RL_STATE_TERMPREPPED) == 0)
+ programmable completion, but we do want to handle window size
+ changes for traps while readline is active or a command bound
+ to `bind -x'. */
+ if (RL_ISSTATE (RL_STATE_COMPLETING) == 0)
+ if (RL_ISSTATE(RL_STATE_DISPATCHING|RL_STATE_TERMPREPPED) != 0)
+ {
+ if (check_window_size)
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+ else
#endif
get_tty_state ();
YYABORT;
}
}
+ | error YYEOF
+ {
+ global_command = (COMMAND *)NULL;
+ if (last_command_exit_value == 0)
+ last_command_exit_value = EX_BADUSAGE; /* force error return */
+ if (interactive && parse_and_execute_level == 0)
+ {
+ handle_eof_input_unit ();
+ YYACCEPT;
+ }
+ else
+ {
+ YYABORT;
+ }
+ }
| yacc_EOF
{
/* Case of EOF seen by itself. Do ignoreeof or
/* If we want to make read errors cancel execution of any partial
line, take out the checks for i == 0 above and set i = 0 if
shell_input_line_terminator == READERR. */
+ /* XXX TAG: bash-5.3 austingroup interp 1629 */
+#if defined (FATAL_READERROR)
+ if (shell_input_line_terminator == READERR)
+ i = 0; /* no-op for now */
+#endif
shell_input_line[i] = '\0';
break;
if (current_token < 0)
#if defined (YYERRCODE) && !defined (YYUNDEF)
- current_token = YYERRCODE;
+ current_token = EOF_Reached ? YYEOF : YYERRCODE;
#else
- current_token = YYUNDEF;
+ current_token = EOF_Reached ? YYEOF : YYUNDEF;
#endif
return (current_token);