k. User-specified subshells (`(...)') now update BASH_COMMAND in the subshell.
-l. Fixed a bug with the `help -m' and loadable builtins.
+l. Fixed a display bug with the `help -m' and loadable builtins.
m. Fixed a potential file descriptor leak when trying to use a pipe for a
here document.
+n. Fix a bug with multiple assignment statements preceding a simple command
+ containing nofork comsubs.
+
+o. Fix a potential bug that could result in a NULL buffered stream even with
+ a valid input file descriptor.
+
2. Changes to Readline
a. Fixed a bug that allowed a history search to change the current history
k. User-specified subshells (`(...)') now update BASH_COMMAND in the subshell.
-l. Fixed a bug with the `help -m' and loadable builtins.
+l. Fixed a display bug with the `help -m' and loadable builtins.
m. Fixed a potential file descriptor leak when trying to use a pipe for a
here document.
+n. Fix a bug with multiple assignment statements preceding a simple command
+ containing nofork comsubs.
+
+o. Fix a potential bug that could result in a NULL buffered stream even with
+ a valid input file descriptor.
+
2. Changes to Readline
a. Fixed a bug that allowed a history search to change the current history
----
lib/readline/rlmbutil.h
- _rl_wcwidth: make sure wchar_t constants have an `L' prefix
+
+ 3/24
+ ----
+subst.c
+ - function_substitute: set temporary_env to NULL (we've already
+ set up an unwind-protect for it) before pushing the context, so
+ pop_context doesn't free it out from underneath the caller.
+ Report from Emanuele Torre <torreemanuele6@gmail.com>
+
+ 3/27
+ ----
+shell.c
+ - set_bash_input: if the call to with_input_from_buffered_stream does
+ not result in a valid buffer corresponding to the file descriptor,
+ print an error message and set last_command_exit_value
+ From a report in https://savannah.gnu.org/patch/?10512
typedef int sh_gcp_func_t (GENERIC_LIST *, char *);
typedef char *sh_string_func_t (char *); /* like savestring, et al. */
+typedef void *sh_copy_func_t (void *); /* generic copy function */
typedef int sh_msg_func_t (const char *, ...); /* printf(3)-like */
typedef void sh_vmsg_func_t (const char *, ...); /* printf(3)-like */
don't discard the upper 32 bits of the value, if present. */
#define HASH_BUCKET(s, t, h) (((h) = hash_string (s)) & ((t)->nbuckets - 1))
-static BUCKET_CONTENTS *copy_bucket_array (BUCKET_CONTENTS *, sh_string_func_t *);
+static BUCKET_CONTENTS *copy_bucket_array (BUCKET_CONTENTS *, sh_copy_func_t *);
static void hash_rehash (HASH_TABLE *, int);
static void hash_grow (HASH_TABLE *);
/* Copy a hash table bucket array. Call (*cpdata) to copy the data from
each element. */
static BUCKET_CONTENTS *
-copy_bucket_array (BUCKET_CONTENTS *ba, sh_string_func_t *cpdata)
+copy_bucket_array (BUCKET_CONTENTS *ba, sh_copy_func_t *cpdata)
{
BUCKET_CONTENTS *new_bucket, *n, *e;
/* Copy an entire hash table. (*cpdata) copies the data in each element. */
HASH_TABLE *
-hash_copy (HASH_TABLE *table, sh_string_func_t *cpdata)
+hash_copy (HASH_TABLE *table, sh_copy_func_t *cpdata)
{
HASH_TABLE *new_table;
int i;
/* Operations on tables as a whole */
extern HASH_TABLE *hash_create (int);
-extern HASH_TABLE *hash_copy (HASH_TABLE *, sh_string_func_t *);
+extern HASH_TABLE *hash_copy (HASH_TABLE *, sh_copy_func_t *);
extern void hash_flush (HASH_TABLE *, sh_free_func_t *);
extern void hash_dispose (HASH_TABLE *);
extern void hash_walk (HASH_TABLE *, hash_wfunc *);
"Project-Id-Version: bash-5.2-rc1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-11 14:50-0500\n"
-"PO-Revision-Date: 2025-02-19 16:48-0800\n"
+"PO-Revision-Date: 2025-03-26 20:56-0700\n"
"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
#: builtins/common.c:242
msgid "invalid hex number"
-msgstr "nevaljan heksadecimalni broj"
+msgstr "nevaljan heksadekadski broj"
#: builtins/common.c:244 expr.c:1574
msgid "invalid number"
#: builtins/declare.def:437
msgid "cannot use `-f' to make functions"
-msgstr "„-f” se ne može koristiti za definiranje funkcija"
+msgstr "„-f” nije moguće koristiti za definiranje funkcija"
#: builtins/declare.def:464 execute_cmd.c:6132
#, c-format
#: builtins/printf.def:919
msgid "missing hex digit for \\x"
-msgstr "nema heksadecimalne znamenke za \\x"
+msgstr "nema heksadekadske znamenke za \\x"
#: builtins/printf.def:934
#, c-format
#: print_cmd.c:380
msgid "xtrace_set: NULL file pointer"
-msgstr "xtrace_set(): pointer datoteke je NULL"
+msgstr "xtrace_set(): pokazivač datoteke je NULL"
#: print_cmd.c:384
#, c-format
msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
-msgstr "deskriptor datoteke xtrace (%d) != broju datoteke u pointeru datoteke xtrace (%d)"
+msgstr "deskriptor datoteke xtrace (%d) != broju datoteke u pokazivaču datoteke xtrace (%d)"
#: print_cmd.c:1545
#, c-format
#: variables.c:2661
#, c-format
msgid "%s: variable may not be assigned value"
-msgstr "%s: varijabli se ne može dodijeliti vrijednost"
+msgstr "%s: varijabli nije moguće dodijeliti vrijednost"
#: variables.c:2818 variables.c:2874
#, c-format
#: variables.c:5410
msgid "pop_scope: head of shell_variables not a temporary environment scope"
-msgstr "pop_scope(): vrh od „shell_variables” nije privremeni raspon valjanosti"
+msgstr "pop_scope(): vrh od „shell_variables” nije privremeni doseg okružja"
#: variables.c:6400
#, c-format
" DIREKTORIJA.\n"
"\n"
" Završi s uspjehom ako je direktorij promijenjen i ako je\n"
-" varijabla okoline PWD uspješno postavljena kad je dana opcija „-P”;\n"
+" varijabla okruženja PWD uspješno postavljena kad je dana opcija „-P”;\n"
" u suprotnom završi s kȏdom 1."
#: builtins.c:425
" \\v vertikalni tabulator\n"
" \\\\ backslash (\\)\n"
" \\0NNN znak s ASCII kȏdom NNN (oktalni, 1 do 3 oktalne znamenke)\n"
-" \\xHH osmobitni znak čija je vrijednost HH (heksadecimalna)\n"
-" \\uHHHH unicode znak čija je vrijednost HHHH (heksadecimalna)\n"
-" HHHH može biti od 1 do 4 heksadecimalne znamenke\n"
-" \\UHHHHHHHH unicode znak čija je vrijednost HHHH (heksadecimalna)\n"
-" HHHHHHHH može biti od 1 do 8 heksadecimalnih znamenki\n"
+" \\xHH osmobitni znak čija je vrijednost HH (heksadekadska)\n"
+" \\uHHHH unicode znak čija je vrijednost HHHH (heksadekadska)\n"
+" HHHH može biti od 1 do 4 heksadekadske znamenke\n"
+" \\UHHHHHHHH unicode znak čija je vrijednost HHHH (heksadekadska)\n"
+" HHHHHHHH može biti od 1 do 8 heksadekadskih znamenki\n"
"\n"
" Završi s uspjehom osim ako se ne dogodi greška pri pisanju."
" -P ne razriješi simbolične linkove pri izvršavanju naredbi poput „cd”\n"
" koje promijene trenutni direktorij\n"
" -p uključi privilegirani način: datoteke BASH_ENV i ENV se zanemare,\n"
-" funkcije ljuske se ne uvoze iz okoline, a zanemari se i\n"
+" funkcije ljuske se ne uvoze iz okruženja, a zanemari se i\n"
" sve SHELLOPTS; taj način se automatski aktivira kad god se stvarni\n"
" i efektivni UID i GID ne podudaraju. Isključivanje ove opcije\n"
" učini da je efektivni UID i GID isti kao i stvarni UID i GID.\n"
" trošenja vremena: ukupno potrošeno vrijeme, CPU vrijeme potrošeno\n"
" korisnikom i CPU vrijeme potrošeno sustavom za izvršavanje naredbi.\n"
"\n"
-" Izlazni format se može prilagoditi s varijablom okoline TIMEFORMAT.\n"
+" Izlazni format se može prilagoditi s varijablom okruženja TIMEFORMAT.\n"
" Opcija „-p” zanemari TIMEFORMAT i ispiše izlaz u prenosivom POSIX\n"
" formatu.\n"
"\n"
if (interactive && no_line_editing == 0)
with_input_from_stdin ();
else if (interactive == 0)
- with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]);
+ {
+ errno = 0;
+ with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]);
+ if (get_buffered_stream (default_buffered_input) == NULL)
+ {
+ last_command_exit_value = EX_NOINPUT;
+ if (errno != 0)
+ sys_error ("%s", _("error creating buffered stream"));
+ else
+ report_error ("%s", _("error creating buffered stream"));
+ }
+ }
else
with_input_from_stream (default_input, dollar_vars[0]);
}
subst_assign_varlist = 0;
- push_context (lambdafunc.name, 1, temporary_env); /* make local variables work */
temporary_env = 0;
- this_shell_function = &lambdafunc;
+ push_context (lambdafunc.name, 1, temporary_env); /* make local variables work */
+ this_shell_function = &lambdafunc;
unwind_protect_int (verbose_flag);
change_flag ('v', FLAG_OFF);
-: ${BUILD_DIR:==/usr/local/build/bash/bash-current}
+: ${BUILD_DIR:=/usr/local/build/bash/bash-current}
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
bash(1)
IMPLEMENTATION
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2025 Free Software Foundation, Inc.
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
/* */
/* **************************************************************** */
-#ifdef INCLUDE_UNUSED
+#if defined (INCLUDE_UNUSED)
/* Copy VAR to a new data structure and return that structure. */
SHELL_VAR *
copy_variable (SHELL_VAR *var)
}
}
+#if defined (INCLUDE_UNUSED)
+void *
+copyvar (void *v)
+{
+ SHELL_VAR *new;
+ new = copy_variable ((SHELL_VAR *)v);
+ return new;
+}
+
+HASH_TABLE *
+copy_vartab (HASH_TABLE *table)
+{
+ HASH_TABLE *newtab;
+
+ newtab = table ? hash_copy (table, copyvar) : NULL;
+ return newtab;
+}
+
+HASH_TABLE *
+copy_temporary_env (void)
+{
+ return copy_vartab (temporary_env);
+}
+#endif
+
/* **************************************************************** */
/* */
/* Creating and manipulating the environment */
extern void merge_temporary_env (void);
extern void merge_function_temporary_env (void);
extern void flush_temporary_env (void);
+extern HASH_TABLE *copy_temporary_env (void);
extern void merge_builtin_env (void);
extern void kill_all_local_variables (void);
+extern HASH_TABLE *copy_vartab (HASH_TABLE *);
+
extern void set_var_read_only (char *);
extern void set_func_read_only (const char *);
extern void set_var_auto_export (char *);