saved_redirects is non-null in the `command exec' case. Fixes
sh -c 'command exec; exit 1' hanging bug uncovered by FreeBSD
sh test cases
-
- 10/18
- -----
-subst.c
- - when in posix mode, shell should not exit if a variable assignment
- error (e.g., assigning to readonly variable) occurs preceding a
- command that is not a special builtin. Fixes bug uncovered by
- FreeBSD sh test cases
- - when in posix mode, the ${!?} and ${!#} expansions are not indirect
- expansions, but posix word expansions involving the `!' variable
-
-parse.y
- - fix parse_comsub so that it does not skip backslash-newline when
- parsing a comment
-
- 10/19
- -----
-subst.c
- - fix parameter_brace_expand so that an attempt to use the % or #
- expansions on an unset variable with -u set will cause a non-
- interactive shell to abort. Posix change
- - fix parameter_brace_expand so that an attempt to use pattern
- substitution or case modification expansions on an unset variable
- with -u set will cause and unbound variable error and make a
- non-interactive shell abort
- - change parameter_brace_expand_length to return INTMAX_MIN if a
- positional parameter is unset and -u is set
- - if parameter_brace_expand_length returns INTMAX_MIN when -u is set,
- treat it as an unbound variable error and make a non-interactive
- shell abort. Posix change
- - change parameter_brace_expand_length to return INTMAX_MIN if an
- implicit reference to array[0] is made ${#array} and array[0] is
- not set when -u is set
-
- 10/20
- -----
-builtins/cd.def
- - Posix 2008 says that if no matching directories are found in $CDPATH,
- use the directory name passed as an operand and go on. Posix change
-
-doc/bashref.texi
- - change Posix mode section with latest additions and removals
free (temp);
}
-#if 0 /* changed for bash-4.2 Posix cd description steps 5-6 */
/* POSIX.2 says that if `.' does not appear in $CDPATH, we don't
try the current directory, so we just punt now with an error
message if POSIXLY_CORRECT is non-zero. The check for cdpath[0]
builtin_error ("%s: %s", dirname, strerror (ENOENT));
return (EXECUTION_FAILURE);
}
-#endif
}
else
dirname = list->word->word;
shell and by the commands it invokes.
If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. If
-a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. If
-a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a
-script run by the . or source builtins finishes executing. A SIGNAL_SPEC
-of ERR means to execute ARG each time a command's failure would cause the
-shell to exit when the -e option is enabled.
+a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.
If no arguments are supplied, trap prints the list of commands associated
with each signal.
.BR RETURN ,
the command
.I arg
-is executed each time a shell function or a script executed with
-the \fB.\fP or \fBsource\fP builtins finishes executing.
+is executed each time a shell function or a script executed with the
+\fB.\fP or \fBsource\fP builtins finishes executing.
.if t .sp 0.5
.if n .sp 1
If a
redirection errors, variable assignment errors for assignments preceding
the command name, and so on.
+@item
+If @env{CDPATH} is set, the @code{cd} builtin will not implicitly
+append the current directory to it. This means that @code{cd} will
+fail if no valid directory name can be constructed from
+any of the entries in @env{$CDPATH}, even if the a directory with
+the same name as the name given as an argument to @code{cd} exists
+in the current directory.
+
@item
A non-interactive shell exits with an error status if a variable
assignment error occurs when no command name follows the assignment
A variable assignment error occurs, for example, when trying to assign
a value to a readonly variable.
-@item
-A non-interactive shell exists with an error status if a variable
-assignment error occurs in an assignment statement preceding a special
-builtin, but not with any other simple command.
-
@item
A non-interactive shell exits with an error status if the iteration
variable in a @code{for} statement or the selection variable in a
does not refer to an existing directory, @code{cd} will fail instead of
falling back to @var{physical} mode.
+@item
+When the @code{pwd} builtin is supplied the @option{-P} option, it resets
+@code{$PWD} to a pathname containing no symlinks.
+
@item
The @code{pwd} builtin verifies that the value it prints is the same as the
current directory, even if it is not asked to check the file system with the
Copyright (C) 1988-2010 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Wed Oct 20 21:37:22 EDT 2010
+@set LASTCHANGE Mon Sep 6 22:08:10 EDT 2010
@set EDITION 4.2
@set VERSION 4.2
-@set UPDATED 20 October 2010
-@set UPDATED-MONTH October 2010
+@set UPDATED 6 September 2010
+@set UPDATED-MONTH September 2010
#ifndef TOCTRL
/* letter to control char -- ASCII. The TOUPPER is in there so \ce and
\cE will map to the same character in $'...' expansions. */
+ /* XXX - should this be TOUPPER(x) ^ x040 ? */
# define TOCTRL(x) (TOUPPER(x) & 037)
#endif
#ifndef UNCTRL
start_lineno = line_number;
while (count)
{
- ch = shell_getc (qc != '\'' && (tflags & (LEX_PASSNEXT)) == 0);
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
while (count)
{
comsub_readchar:
- ch = shell_getc (qc != '\'' && (tflags & (LEX_INCOMMENT|LEX_PASSNEXT)) == 0);
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
"Project-Id-Version: bash 4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-30 08:25-0500\n"
-"PO-Revision-Date: 2010-01-03 22:30+0100\n"
+"PO-Revision-Date: 2010-10-18 22:31+0200\n"
"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
#: builtins/exit.def:120
#, c-format
msgid "There are stopped jobs.\n"
-msgstr "Jsou zde pozastavenà úlohy.\n"
+msgstr "Jsou zde pozastavené úlohy.\n"
#: builtins/exit.def:122
#, c-format
"Project-Id-Version: GNU bash 4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-30 08:25-0500\n"
-"PO-Revision-Date: 2010-08-19 15:21+0900\n"
+"PO-Revision-Date: 2010-10-17 19:38+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
#: builtins/alias.def:132
#, c-format
msgid "`%s': invalid alias name"
-msgstr "%s: 無効なエイリアス名です"
+msgstr "`%s': 無効なエイリアス名です"
#: builtins/bind.def:120 builtins/bind.def:123
msgid "line editing not enabled"
#: builtins/enable.def:474
#, c-format
msgid "%s: cannot delete: %s"
-msgstr "%s: %s を削除できません"
+msgstr "%s: 削除できません: %s"
#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
#: shell.c:1452
#: builtins/exec.def:212
#, c-format
msgid "%s: cannot execute: %s"
-msgstr "%s: %s を実行できません"
+msgstr "%s: 実行できません: %s"
#: builtins/exit.def:65
#, c-format
#: builtins/fc.def:370
#, c-format
msgid "%s: cannot open temp file: %s"
-msgstr "%s: 一時ファイル %s を開くことができません"
+msgstr "%s: 一時ファイルを開くことができません: %s"
#: builtins/fg_bg.def:149 builtins/jobs.def:282
msgid "current"
#: builtins/help.def:185
#, c-format
msgid "%s: cannot open: %s"
-msgstr "%s: %s を開くことができません"
+msgstr "%s: 開くことができません: %s"
#: builtins/help.def:337
#, c-format
#: builtins/mapfile.def:249 builtins/read.def:279
#, c-format
msgid "%s: invalid file descriptor specification"
-msgstr "%s: 指定したファイル記述子は無効です"
+msgstr "%s: 無効なファイル記述子指定です"
#: builtins/mapfile.def:257 builtins/read.def:286
#, c-format
#: builtins/type.def:337
#, c-format
msgid "%s is hashed (%s)\n"
-msgstr "%s ã\81¯ã\83\8fã\83\83ã\82·ã\83¥ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8b (%s)\n"
+msgstr "%s ã\81¯ã\83\8fã\83\83ã\82·ã\83¥ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99 (%s)\n"
#: builtins/ulimit.def:372
#, c-format
#: builtins/ulimit.def:398
#, c-format
msgid "`%c': bad command"
-msgstr "`%c': 誤った指定です"
+msgstr "`%c': 誤ったコマンドです"
#: builtins/ulimit.def:427
#, c-format
#: execute_cmd.c:497
#, c-format
msgid "cannot redirect standard input from /dev/null: %s"
-msgstr "/dev/null ã\82\92å\85¥å\8a\9bã\81«リダイレクトできません: %s"
+msgstr "/dev/null ã\81\8bã\82\89æ¨\99æº\96å\85¥å\8a\9bã\81«å¯¾ã\81\97ã\81¦リダイレクトできません: %s"
#: execute_cmd.c:1162
#, c-format
#: execute_cmd.c:4481
#, c-format
msgid "%s: restricted: cannot specify `/' in command names"
-msgstr "%s: 制限されています: `/' をコマンド名に指定できません"
+msgstr "%s: å\88¶é\99\90ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99: `/' ã\82\92ã\82³ã\83\9eã\83³ã\83\89å\90\8dã\81®ä¸ã\81«æ\8c\87å®\9aã\81§ã\81\8dã\81¾ã\81\9bã\82\93"
#: execute_cmd.c:4572
#, c-format
#: expr.c:471
msgid "bug: bad expassign token"
-msgstr "bug: 誤った式のトークンです"
+msgstr "バグ: 誤った式のトークンです"
#: expr.c:513
msgid "`:' expected for conditional expression"
#: jobs.c:1113
#, c-format
msgid "add_process: pid %5ld (%s) marked as still alive"
-msgstr "add_process: pid %5ld (%s) はまだ存在しています"
+msgstr "add_process: pid %5ld (%s) ã\81¯ã\81¾ã\81 å\98å\9c¨ã\81\97ã\81¦ã\81\84ã\82\8bã\81¨ã\83\9eã\83¼ã\82¯ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99"
#: jobs.c:1401
#, c-format
#: jobs.c:3682
msgid "no job control in this shell"
-msgstr "ã\81\93ã\81®ã\82·ã\82§ã\83«ã\81«ã\81¯ã\82¸ã\83§ã\83\96å\88¶å¾¡ã\81\8cã\81\82ã\82\8aã\81¾ã\81\9bã\82\93"
+msgstr "ã\81\93ã\81®ã\82·ã\82§ã\83«ã\81§ã\81¯ã\82¸ã\83§ã\83\96å\88¶å¾¡ã\81\8cç\84¡å\8a¹ã\81«ã\81ªã\81£ã\81¦ã\81\84ã\81¾ã\81\99"
#: lib/malloc/malloc.c:296
#, c-format
"\r\n"
"malloc: %s:%d: assertion botched\r\n"
msgstr ""
-"\\r\n"
-"malloc: %s:%d: アサーション失敗\\r\n"
+"\r\n"
+"malloc: %s:%d: アサーション失敗\r\n"
#: lib/malloc/malloc.c:313
msgid "unknown"
#: lib/malloc/malloc.c:797
msgid "malloc: block on free list clobbered"
-msgstr "malloc: block on free リストにあるブロックが壊れています"
+msgstr "malloc: free ブロックリストが壊れています"
#: lib/malloc/malloc.c:874
msgid "free: called with already freed block argument"
/* Evaluates to 1 if C is one of the shell's special parameters for which an
indirect variable reference may be made. */
#define VALID_INDIR_PARAM(c) \
- ((posixly_correct == 0 && (c) == '#') || (posixly_correct == 0 && (c) == '?') || (c) == '@' || (c) == '*')
+ ((c) == '#' || (c) == '?' || (c) == '@' || (c) == '*')
/* Evaluates to 1 if C is one of the OP characters that follows the parameter
in ${parameter[:]OPword}. */
break;
case '!':
if (last_asynchronous_pid == NO_PID)
- t = (char *)NULL; /* XXX - error if set -u set? */
+ t = (char *)NULL;
else
t = itos (last_asynchronous_pid);
break;
if (legal_number (name + 1, &arg_index)) /* ${#1} */
{
t = get_dollar_var_value (arg_index);
- if (t == 0 && unbound_vars_is_error)
- return INTMAX_MIN;
number = MB_STRLEN (t);
FREE (t);
}
t = assoc_reference (assoc_cell (var), "0");
else
t = array_reference (array_cell (var), 0);
- if (t == 0 && unbound_vars_is_error)
- return INTMAX_MIN;
number = MB_STRLEN (t);
}
#endif
/* If the name really consists of a special variable, then make sure
that we have the entire name. We don't allow indirect references
to special variables except `#', `?', `@' and `*'. */
- if ((sindex == t_index && VALID_SPECIAL_LENGTH_PARAM (string[t_index])) ||
- (sindex == t_index - 1 && string[sindex] == '!' && VALID_INDIR_PARAM (string[t_index])))
+ if ((sindex == t_index &&
+ (string[t_index] == '-' ||
+ string[t_index] == '?' ||
+ string[t_index] == '#')) ||
+ (sindex == t_index - 1 && string[sindex] == '!' &&
+ (string[t_index] == '#' ||
+ string[t_index] == '?' ||
+ string[t_index] == '@' ||
+ string[t_index] == '*')))
{
t_index++;
free (name);
}
number = parameter_brace_expand_length (name);
- if (number == INTMAX_MIN && unbound_vars_is_error)
- {
- last_command_exit_value = EXECUTION_FAILURE;
- err_unboundvar (name+1);
- free (name);
- return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
- }
free (name);
*indexp = sindex;
*indexp = sindex;
- /* All the cases where an expansion can possibly generate an unbound
- variable error. */
- if (want_substring || want_patsub || want_casemod || c == '#' || c == '%' || c == RBRACE)
- {
- if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]))
- {
- last_command_exit_value = EXECUTION_FAILURE;
- err_unboundvar (name);
- FREE (value);
- FREE (temp);
- free (name);
- return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
- }
- }
-
/* If this is a substring spec, process it and add the result. */
if (want_substring)
{
return &expand_wdesc_error;
case RBRACE:
+ if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (name);
+ FREE (value);
+ FREE (temp);
+ free (name);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
break;
case '#': /* ${param#[#]pattern} */
if ((eflags & WEXP_VARASSIGN) && subst_assign_varlist)
{
sh_wassign_func_t *assign_func;
- int is_special_builtin;
/* If the remainder of the words expand to nothing, Posix.2 requires
that the variable and environment assignments affect the shell's
assign_func = new_list ? assign_in_env : do_word_assignment;
tempenv_assign_error = 0;
- /* Posix says that special builtins exit if a variable assignment error
- occurs in an assignment preceding it. */
- is_special_builtin = (posixly_correct && new_list && find_special_builtin (new_list->word->word));
-
for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next)
{
this_command_name = (char *)NULL;
if (assign_func == do_word_assignment)
{
last_command_exit_value = EXECUTION_FAILURE;
- if (interactive_shell == 0 && posixly_correct && is_special_builtin)
+ if (interactive_shell == 0 && posixly_correct)
exp_jump_to_top_level (FORCE_EOF);
else
exp_jump_to_top_level (DISCARD);
-BUILD_DIR=/usr/local/build/bash/bash-current
+BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR