- 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.
.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
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})
char *ofifo_list;
#endif
-
#if defined (PROCESS_SUBSTITUTION)
ofifo = num_fifos ();
ofifo_list = copy_fifo_list (&osize);
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));
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.
#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
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_ */