4/27
----
lib/sh/strvis.c
- - strivs: changes to handle being compiled without multibyte support
+ - sh_charvis: changes to handle being compiled without multibyte support
+
+ 4/29
+ ----
+lib/readline/callback.c
+ - rl_callback_read_char: don't set rl_eof_found unless eof is > 0,
+ since it can be -3 if we need to read more input in a multi-key
+ sequence. Report from Andrew Burgess <aburgess@redhat.com>
+
+examples/loadables/Makefile.sample.in
+ - new file, containing the rules to build the example shared object
+ - includes Makefile.inc from wherever it's installed. Suggested by
+ Robert E. Griffith <bobg@junga.com>
+
+examples/loadables/Makefile.inc.in
+ - remove rules that create the example shared object
+
+ 4/30
+ ----
+builtins/evalstring.c
+ - parse_and_execute: check for terminating signals before returning,
+ after any longjmp, to improve responsiveness and fix the -c code
+ path before running any exit trap. Report from
+ Emanuele Torre <torreemanuele6@gmail.com>
examples/loadables/loadables.h f
examples/loadables/Makefile.in f
examples/loadables/Makefile.inc.in f
+examples/loadables/Makefile.sample.in f
examples/loadables/necho.c f
examples/loadables/hello.c f
examples/loadables/asort.c f
make_cmd.h subst.h sig.h externs.h builtins.h \
bashtypes.h xmalloc.h config-top.h config-bot.h \
bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \
- conftypes.h unwind_prot.h jobs.h siglist.h
+ conftypes.h unwind_prot.h jobs.h siglist.h \
+ execute_cmd.h
INSTALLED_BUILTINS_HEADERS = bashgetopt.h common.h getopt.h
INSTALLED_INCFILES = posixstat.h ansi_stdlib.h filecntl.h posixdir.h \
memalloc.h stdc.h posixjmp.h posixwait.h posixtime.h systimes.h \
lib/readline/Makefile lib/glob/Makefile \
lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \
lib/termcap/Makefile examples/loadables/Makefile \
- examples/loadables/Makefile.inc \
+ examples/loadables/Makefile.inc examples/loadables/Makefile.sample \
examples/loadables/perl/Makefile support/Makefile \
lib/intl/Makefile po/Makefile po/Makefile.in
CREATED_HEADERS = signames.h config.h pathnames.h version.h y.tab.h \
extern char **bash_default_completion PARAMS((const char *, int, int, int, int));
-void set_directory_hook PARAMS((void));
+extern void set_directory_hook PARAMS((void));
/* Used by programmable completion code. */
extern char *command_word_completion_function PARAMS((const char *, int));
break;
}
}
-
+
if (parse_command () == 0)
{
if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
throw_to_top_level ();
}
+ CHECK_TERMSIG;
+
if (should_jump_to_top_level)
jump_to_top_level (code);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&ps_sigmask);
#endif
-/*itrace("parse_string: `%s'", string);*/
/* Reset the line number if the caller wants us to. If we don't reset the
line number, we have to subtract one, because we will add one just
before executing the next command (resetting the line number sets it to
#! /bin/sh
-# From configure.ac for Bash 5.2, version 5.040.
+# From configure.ac for Bash 5.2, version 5.041.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for bash 5.2-beta.
#
#AC_SUBST(ALLOCA_SOURCE)
#AC_SUBST(ALLOCA_OBJECT)
-ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
+ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
ac_config_commands="$ac_config_commands stamp-h"
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
"examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
+ "examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;;
"examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
"support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
"support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;;
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Bash 5.2, version 5.040])dnl
+AC_REVISION([for Bash 5.2, version 5.041])dnl
define(bashvers, 5.2)
define(relstatus, beta)
lib/tilde/Makefile doc/Makefile support/Makefile \
po/Makefile.in examples/loadables/Makefile \
examples/loadables/Makefile.inc \
+ examples/loadables/Makefile.sample \
examples/loadables/perl/Makefile \
support/bash.pc support/bashbug.sh])
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Fri Mar 11 10:16:50 EST 2022
+.\" Last Change: Mon May 2 09:00:07 EDT 2022
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2022 March 11" "GNU Bash 5.2"
+.TH BASH 1 "2022 May 2" "GNU Bash 5.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
variable may be used to specify the format of
the time information.
.PP
-Each command in a pipeline is executed in a \fIsubshell\fP, which is a
+Each command in a multi-command
+pipeline is executed in a \fIsubshell\fP, which is a
separate process.
See
.SM
If the pipeline is not executed asynchronously (@pxref{Lists}), the
shell waits for all commands in the pipeline to complete.
-Each command in a pipeline is executed in its own @dfn{subshell}, which is a
+Each command in a multi-command
+pipeline is executed in its own @dfn{subshell}, which is a
separate process (@pxref{Command Execution Environment}).
If the @code{lastpipe} option is enabled using the @code{shopt} builtin
(@pxref{The Shopt Builtin}),
Copyright (C) 1988-2022 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Mon Apr 11 17:04:12 EDT 2022
+@set LASTCHANGE Mon May 2 08:59:39 EDT 2022
@set EDITION 5.2
@set VERSION 5.2
-@set UPDATED 11 April 2022
-@set UPDATED-MONTH April 2022
+@set UPDATED 2 May 2022
+@set UPDATED-MONTH May 2022
pushd.o: pushd.c
$(RM) $@
- $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
+ $(SHOBJ_CC) -Wno-format-security -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
pushd: pushd.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
-( cd perl && ${MAKE} ${MFLAGS} $@ )
distclean maintainer-clean: clean
- $(RM) Makefile Makefile.inc pushd.c
+ $(RM) Makefile Makefile.inc Makefile.sample pushd.c
-( cd perl && ${MAKE} ${MFLAGS} $@ )
installdirs:
install-dev: installdirs
@$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc
+ @$(INSTALL_DATA) Makefile.sample $(DESTDIR)$(loadablesdir)/Makefile.sample
@$(INSTALL_DATA) $(srcdir)/loadables.h $(DESTDIR)$(loadablesdir)/loadables.h
@( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers)
done
uninstall-dev:
- -$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/loadables.h
+ -$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.sample
+ -$(RM) $(DESTDIR)$(loadablesdir)/loadables.h
-( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers)
uninstall-supported: uninstall-dev
#
# Sample makefile for bash loadable builtin development
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
.c.o:
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
-
-all: example
-
-example: example.o
- $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)
-
-example.o: example.c
--- /dev/null
+#
+# Sample makefile for bash loadable builtin development
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# these should match the ones in Makefile.in (for the make install target)
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+
+# ${loadablesdir} is where the example loadable builtins and data files
+# are installed (make install target in Makefile.in)
+
+loadablesdir = @loadablesdir@
+DESTDIR =
+
+# include Makefile.inc for all boilerplate definitions
+
+include $(DESTDIR)$(loadablesdir)/Makefile.inc
+
+# here, `example' is the name of the shared object
+# replace `example' with the appropriate filename
+
+all: example
+
+example: example.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)
+
+example.o: example.c
for (sawc = 0, l = list; l; l = l->next)
{
ostr = ansicstr (l->word->word, strlen (l->word->word), 0, &sawc, (int *)0);
- fprintf (ofp, "%s", ostr);
+ if (ostr)
+ fprintf (ofp, "%s", ostr);
free (ostr);
if (sawc)
return (0);
}
/* Make sure application hooks can see whether we saw EOF. */
- if (rl_eof_found = eof)
- RL_SETSTATE(RL_STATE_EOF);
+ if (eof > 0)
+ {
+ rl_eof_found = eof;
+ RL_SETSTATE(RL_STATE_EOF);
+ }
if (rl_done)
{