]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20140530 snapshot
authorChet Ramey <chet.ramey@case.edu>
Fri, 6 Jun 2014 17:57:23 +0000 (13:57 -0400)
committerChet Ramey <chet.ramey@case.edu>
Fri, 6 Jun 2014 17:57:23 +0000 (13:57 -0400)
CWRU/CWRU.chlog
doc/bash.1
doc/bashref.texi
execute_cmd.c
lib/readline/input.c
patchlevel.h

index 6a202fb30de3fb66cad8c46b05481d7b7fcdc79e..9c1cae94f3506c6856965c1ec36447feeae36fdd 100644 (file)
@@ -6291,3 +6291,11 @@ arrayfunc.c
        - bind_array_var_internal: make sure ENTRY no longer has invisible
          attribute before returning.  Fixes bug reported by Geir Hauge
          <geir.hauge@gmail.com>
+
+                                  5/22
+                                  ----
+execute_cmd.c
+       - shell_execve: if execve fails and we return 127 or 126, make sure to
+         set last_command_exit_value if a call to file_error or report_error
+         causes the shell to exit.  This ensures that the shell exits with
+         the right value.
index b96c6a461a6028be4d4b3817b370f951b7421d1a..023cd9d39414d75751e88e4c8b194f410e2a27c8 100644 (file)
@@ -6909,7 +6909,7 @@ or was started without job control.
 .TP
 \fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIfunction\-name\fP
 .TP
-\fBbind\fP \fIreadline\-command\fP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIreadline\-command\fP
 .PD
 Display current
 .B readline
index 490ad084a01b573dd59341c54f4071dc66e2fca0..d552757dc9162ad63a882113080b144c8618796b 100644 (file)
@@ -3773,7 +3773,7 @@ bind [-m @var{keymap}] [-q @var{function}] [-u @var{function}] [-r @var{keyseq}]
 bind [-m @var{keymap}] -f @var{filename}
 bind [-m @var{keymap}] -x @var{keyseq:shell-command}
 bind [-m @var{keymap}] @var{keyseq:function-name}
-bind @var{readline-command}
+bind [-m @var{keymap}] @var{keyseq:readline-command}
 @end example
 
 Display current Readline (@pxref{Command Line Editing})
index d9dc18b79d8af0ba750b874765615bd92e90466a..44a8afcf99e0196d0b31551b48f9ce3070d85e39 100644 (file)
@@ -4735,7 +4735,6 @@ execute_builtin_or_function (words, builtin, var, redirects,
   char *ofifo_list;
 #endif
 
-
 #if defined (PROCESS_SUBSTITUTION)  
   ofifo = num_fifos ();
   ofifo_list = copy_fifo_list (&osize);
@@ -5219,6 +5218,8 @@ shell_execve (command, args, env)
      Maybe it is something we can hack ourselves. */
   if (i != ENOEXEC)
     {
+      /* make sure this is set correctly for file_error/report_error */
+      last_command_exit_value = (i == ENOENT) ?  EX_NOTFOUND : EX_NOEXEC; /* XXX Posix.2 says that exit status is 126 */
       if (file_isdir (command))
 #if defined (EISDIR)
        internal_error (_("%s: %s"), command, strerror (EISDIR));
@@ -5266,7 +5267,7 @@ shell_execve (command, args, env)
          errno = i;
          file_error (command);
        }
-      return ((i == ENOENT) ? EX_NOTFOUND : EX_NOEXEC);        /* XXX Posix.2 says that exit status is 126 */
+      return (last_command_exit_value);
     }
 
   /* This file is executable.
index 5987591456cef3568e0b4b4f7dfbd06a07163d90..0e5b90e607ec67802127c39103ad605df1e6ba99 100644 (file)
@@ -525,7 +525,7 @@ rl_getc (stream)
 #undef X_EWOULDBLOCK
 #undef X_EAGAIN
 
-fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); 
+/* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */
 
       /* If the error that we received was EINTR, then try again,
         this is simply an interrupted system call to read ().  We allow
index b7c2ff4c16724999ddcedec12ca853f412f67e0e..d669696c4433e25bc85dbcff0d56320eb5a26613 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 11
+#define PATCHLEVEL 18
 
 #endif /* _PATCHLEVEL_H_ */