source:
scripts/patches/bash-3.1-fixes-5.patch@
42da714
Last change on this file since 42da714 was de2a4b2, checked in by , 19 years ago | |
---|---|
|
|
File size: 16.0 KB |
-
doc/bash.1
Submitted By: Archaic (archaic AT linuxfromscratch D0T org) Date: 2006-02-27 Initial Package Version: 3.1 Upstream Status: From Upstream Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/ Description: Contains patches 001-011 from upstream (including the fixed 010 patch) diff -Naur bash-3.1.orig/doc/bash.1 bash-3.1/doc/bash.1
old new 6 6 .\" Case Western Reserve University 7 7 .\" chet@po.cwru.edu 8 8 .\" 9 .\" Last Change: Sat Aug 27 13:28:44 EDT 20059 .\" Last Change: Wed Dec 28 19:58:45 EST 2005 10 10 .\" 11 11 .\" bash_builtins, strip all but Built-Ins section 12 12 .if \n(zZ=1 .ig zZ 13 13 .if \n(zY=1 .ig zY 14 .TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"14 .TH BASH 1 "2005 Dec 28" "GNU Bash-3.1" 15 15 .\" 16 16 .\" There's some problem with having a `@' 17 17 .\" in a tagged paragraph with the BSD man macros. … … 677 677 .B nocasematch 678 678 is enabled, the match is performed without regard to the case 679 679 of alphabetic characters. 680 The return value is 0 if the string matches or does not match681 the pattern, respectively, and 1 otherwise.680 The return value is 0 if the string matches (\fB==\fP) or does not match 681 (\fB!=\fP) the pattern, and 1 otherwise. 682 682 Any part of the pattern may be quoted to force it to be matched as a 683 683 string. 684 684 .if t .sp 0.5 … … 807 807 as for pathname expansion (see 808 808 .B Pathname Expansion 809 809 below). 810 The \fIword\fP is expanded using tilde 811 expansion, parameter and variable expansion, arithmetic substituion, 812 command substitution, process substitution and quote removal. 813 Each \fIpattern\fP examined is expanded using tilde 814 expansion, parameter and variable expansion, arithmetic substituion, 815 command substitution, and process substitution. 810 816 If the shell option 811 817 .B nocasematch 812 818 is enabled, the match is performed without regard to the case … … 8484 8490 returns true if any of the arguments are found, false if 8485 8491 none are found. 8486 8492 .TP 8487 \fBulimit\fP [\fB\-SHacdf lmnpstuv\fP [\fIlimit\fP]]8493 \fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]] 8488 8494 Provides control over the resources available to the shell and to 8489 8495 processes started by it, on systems that allow such control. 8490 8496 The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is … … 8523 8529 .B \-f 8524 8530 The maximum size of files created by the shell 8525 8531 .TP 8532 .B \-i 8533 The maximum number of pending signals 8534 .TP 8526 8535 .B \-l 8527 8536 The maximum size that may be locked into memory 8528 8537 .TP … … 8536 8545 .B \-p 8537 8546 The pipe size in 512-byte blocks (this may not be set) 8538 8547 .TP 8548 .B \-q 8549 The maximum number of bytes in POSIX message queues 8550 .TP 8539 8551 .B \-s 8540 8552 The maximum stack size 8541 8553 .TP … … 8547 8559 .TP 8548 8560 .B \-v 8549 8561 The maximum amount of virtual memory available to the shell 8562 .TP 8563 .B \-x 8564 The maximum number of file locks 8550 8565 .PD 8551 8566 .PP 8552 8567 If -
doc/bashref.texi
diff -Naur bash-3.1.orig/doc/bashref.texi bash-3.1/doc/bashref.texi
old new 961 961 (see the description of @code{shopt} in @ref{Bash Builtins}) 962 962 is enabled, the match is performed without regard to the case 963 963 of alphabetic characters. 964 The return value is 0 if the string matches or does not match965 the pattern, respectively, and 1 otherwise.964 The return value is 0 if the string matches (@samp{==}) or does not 965 match (@samp{!=})the pattern, and 1 otherwise. 966 966 Any part of the pattern may be quoted to force it to be matched as a 967 967 string. 968 968 … … 2598 2598 Builtin commands are necessary to implement functionality impossible 2599 2599 or inconvenient to obtain with separate utilities. 2600 2600 2601 This section briefly the builtins which Bash inherits from2601 This section briefly describes the builtins which Bash inherits from 2602 2602 the Bourne Shell, as well as the builtin commands which are unique 2603 2603 to or have been extended in Bash. 2604 2604 … … 3833 3833 @item ulimit 3834 3834 @btindex ulimit 3835 3835 @example 3836 ulimit [-acdf lmnpstuvSH] [@var{limit}]3836 ulimit [-acdfilmnpqstuvxSH] [@var{limit}] 3837 3837 @end example 3838 3838 @code{ulimit} provides control over the resources available to processes 3839 3839 started by the shell, on systems that allow such control. If an … … 3857 3857 @item -f 3858 3858 The maximum size of files created by the shell. 3859 3859 3860 @item -i 3861 The maximum number of pending signals. 3862 3860 3863 @item -l 3861 3864 The maximum size that may be locked into memory. 3862 3865 … … 3869 3872 @item -p 3870 3873 The pipe buffer size. 3871 3874 3875 @item -q 3876 The maximum number of bytes in POSIX message queues. 3877 3872 3878 @item -s 3873 3879 The maximum stack size. 3874 3880 … … 3881 3887 @item -v 3882 3888 The maximum amount of virtual memory available to the process. 3883 3889 3890 @item -x 3891 The maximum number of file locks. 3892 3884 3893 @end table 3885 3894 3886 3895 If @var{limit} is given, it is the new value of the specified resource; … … 4089 4098 Print shell input lines as they are read. 4090 4099 4091 4100 @item -x 4092 Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP4093 commands, \fBselect\fP commands, and arithmetic \fBfor\fPcommands4101 Print a trace of simple commands, @code{for} commands, @code{case} 4102 commands, @code{select} commands, and arithmetic @code{for} commands 4094 4103 and their arguments or associated word lists after they are 4095 4104 expanded and before they are executed. The value of the @env{PS4} 4096 4105 variable is expanded and the resultant value is printed before -
doc/version.texi
diff -Naur bash-3.1.orig/doc/version.texi bash-3.1/doc/version.texi
old new 2 2 Copyright (C) 1988-2005 Free Software Foundation, Inc. 3 3 @end ignore 4 4 5 @set LASTCHANGE Mon Sep 5 11:47:04 EDT 20055 @set LASTCHANGE Fri Dec 30 10:50:51 EST 2005 6 6 7 @set EDITION 3.1 -beta18 @set VERSION 3.1 -beta19 @set UPDATED 5 September 200510 @set UPDATED-MONTH September 20057 @set EDITION 3.1 8 @set VERSION 3.1 9 @set UPDATED 30 December 2005 10 @set UPDATED-MONTH December 2005 -
bash-3.1
diff -Naur bash-3.1.orig/jobs.c bash-3.1/jobs.c
old new 619 619 * once in the parent and once in each child. This is where 620 620 * the parent gives it away. 621 621 * 622 * Don't give the terminal away if this shell is an asynchronous 623 * subshell. 624 * 622 625 */ 623 if (job_control && newjob->pgrp )626 if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) 624 627 give_terminal_to (newjob->pgrp, 0); 625 628 } 626 629 } … … 844 847 realloc_jobs_list () 845 848 { 846 849 sigset_t set, oset; 847 int nsize, i, j ;850 int nsize, i, j, ncur, nprev; 848 851 JOB **nlist; 849 852 853 ncur = nprev = NO_JOB; 850 854 nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS); 851 855 nsize *= JOB_SLOTS; 852 856 i = js.j_njobs % JOB_SLOTS; … … 854 858 nsize += JOB_SLOTS; 855 859 856 860 BLOCK_CHILD (set, oset); 857 nlist = (JOB **) xmalloc (nsize * sizeof (JOB *)); 861 nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *)); 862 858 863 for (i = j = 0; i < js.j_jobslots; i++) 859 864 if (jobs[i]) 860 nlist[j++] = jobs[i]; 865 { 866 if (i == js.j_current) 867 ncur = j; 868 if (i == js.j_previous) 869 nprev = j; 870 nlist[j++] = jobs[i]; 871 } 872 873 #if defined (DEBUG) 874 itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize); 875 itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0); 876 itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0); 877 #endif 861 878 862 879 js.j_firstj = 0; 863 js.j_lastj = (j > 0) ? j - 1: 0; 880 js.j_lastj = (j > 0) ? j - 1 : 0; 881 js.j_njobs = j; 864 882 js.j_jobslots = nsize; 865 883 866 free (jobs); 867 jobs = nlist; 884 /* Zero out remaining slots in new jobs list */ 885 for ( ; j < nsize; j++) 886 nlist[j] = (JOB *)NULL; 887 888 if (jobs != nlist) 889 { 890 free (jobs); 891 jobs = nlist; 892 } 893 894 if (ncur != NO_JOB) 895 js.j_current = ncur; 896 if (nprev != NO_JOB) 897 js.j_previous = nprev; 898 899 /* Need to reset these */ 900 if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj) 901 reset_current (); 902 903 #ifdef DEBUG 904 itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous); 905 #endif 868 906 869 907 UNBLOCK_CHILD (oset); 870 908 } … … 1655 1693 In this case, we don't want to give the terminal to the 1656 1694 shell's process group (we could be in the middle of a 1657 1695 pipeline, for example). */ 1658 if (async_p == 0 && pipeline_pgrp != shell_pgrp )1696 if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0)) 1659 1697 give_terminal_to (pipeline_pgrp, 0); 1660 1698 1661 1699 #if defined (PGRP_PIPE) … … 2198 2236 /* This is possibly a race condition -- should it go in stop_pipeline? */ 2199 2237 wait_sigint_received = 0; 2200 2238 if (job_control == 0) 2201 old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); 2239 { 2240 old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); 2241 if (old_sigint_handler == SIG_IGN) 2242 set_signal_handler (SIGINT, old_sigint_handler); 2243 } 2202 2244 2203 2245 termination_state = last_command_exit_value; 2204 2246 -
lib/readline/terminal.c
diff -Naur bash-3.1.orig/lib/readline/terminal.c bash-3.1/lib/readline/terminal.c
old new 122 122 static char *_rl_visible_bell; 123 123 124 124 /* Non-zero means the terminal can auto-wrap lines. */ 125 int _rl_term_autowrap ;125 int _rl_term_autowrap = -1; 126 126 127 127 /* Non-zero means that this terminal has a meta key. */ 128 128 static int term_has_meta; … … 274 274 _rl_set_screen_size (rows, cols) 275 275 int rows, cols; 276 276 { 277 if (_rl_term_autowrap == -1) 278 _rl_init_terminal_io (rl_terminal_name); 279 277 280 if (rows > 0) 278 281 _rl_screenheight = rows; 279 282 if (cols > 0) -
parse.y
diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
old new 2716 2716 #define P_ALLOWESC 0x02 2717 2717 #define P_DQUOTE 0x04 2718 2718 #define P_COMMAND 0x08 /* parsing a command, so look for comments */ 2719 #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */ 2719 2720 2720 2721 static char matched_pair_error; 2721 2722 static char * … … 2725 2726 int *lenp, flags; 2726 2727 { 2727 2728 int count, ch, was_dollar, in_comment, check_comment; 2728 int pass_next_character, nestlen, ttranslen, start_lineno;2729 int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno; 2729 2730 char *ret, *nestret, *ttrans; 2730 2731 int retind, retsize, rflags; 2731 2732 2732 2733 count = 1; 2733 pass_next_character = was_dollar = in_comment = 0;2734 pass_next_character = backq_backslash = was_dollar = in_comment = 0; 2734 2735 check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; 2735 2736 2736 2737 /* RFLAGS is the set of flags we want to pass to recursive calls. */ … … 2742 2743 start_lineno = line_number; 2743 2744 while (count) 2744 2745 { 2745 #if 0 2746 ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0); 2747 #else 2748 ch = shell_getc (qc != '\'' && pass_next_character == 0); 2749 #endif 2746 ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0); 2747 2750 2748 if (ch == EOF) 2751 2749 { 2752 2750 free (ret); … … 2771 2769 continue; 2772 2770 } 2773 2771 /* Not exactly right yet */ 2774 else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))2772 else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1]))) 2775 2773 in_comment = 1; 2776 2774 2775 /* last char was backslash inside backquoted command substitution */ 2776 if (backq_backslash) 2777 { 2778 backq_backslash = 0; 2779 /* Placeholder for adding special characters */ 2780 } 2781 2777 2782 if (pass_next_character) /* last char was backslash */ 2778 2783 { 2779 2784 pass_next_character = 0; … … 2814 2819 { 2815 2820 if MBTEST((flags & P_ALLOWESC) && ch == '\\') 2816 2821 pass_next_character++; 2822 else if MBTEST((flags & P_BACKQUOTE) && ch == '\\') 2823 backq_backslash++; 2817 2824 continue; 2818 2825 } 2819 2826 … … 2898 2905 } 2899 2906 else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0) 2900 2907 { 2901 nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags); 2908 /* Add P_BACKQUOTE so backslash quotes the next character and 2909 shell_getc does the right thing with \<newline>. We do this for 2910 a measure of backwards compatibility -- it's not strictly the 2911 right POSIX thing. */ 2912 nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE); 2902 2913 goto add_nestret; 2903 2914 } 2904 2915 else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ … … 2907 2918 if (open == ch) /* undo previous increment */ 2908 2919 count--; 2909 2920 if (ch == '(') /* ) */ 2910 nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags );2921 nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE); 2911 2922 else if (ch == '{') /* } */ 2912 2923 nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); 2913 2924 else if (ch == '[') /* ] */ … … 3695 3706 struct builtin *b; 3696 3707 b = builtin_address_internal (token, 0); 3697 3708 if (b && (b->flags & ASSIGNMENT_BUILTIN)) 3698 parser_state |= PST_ASSIGNOK; 3709 parser_state |= PST_ASSIGNOK; 3710 else if (STREQ (token, "eval") || STREQ (token, "let")) 3711 parser_state |= PST_ASSIGNOK; 3699 3712 } 3700 3713 3701 3714 yylval.word = the_word; … … 4686 4699 int *retlenp; 4687 4700 { 4688 4701 WORD_LIST *wl, *rl; 4689 int tok, orig_line_number, orig_token_size ;4702 int tok, orig_line_number, orig_token_size, orig_last_token, assignok; 4690 4703 char *saved_token, *ret; 4691 4704 4692 4705 saved_token = token; 4693 4706 orig_token_size = token_buffer_size; 4694 4707 orig_line_number = line_number; 4708 orig_last_token = last_read_token; 4695 4709 4696 4710 last_read_token = WORD; /* WORD to allow reserved words here */ 4697 4711 4698 4712 token = (char *)NULL; 4699 4713 token_buffer_size = 0; 4700 4714 4715 assignok = parser_state&PST_ASSIGNOK; /* XXX */ 4716 4701 4717 wl = (WORD_LIST *)NULL; /* ( */ 4702 4718 parser_state |= PST_COMPASSIGN; 4703 4719 … … 4740 4756 jump_to_top_level (DISCARD); 4741 4757 } 4742 4758 4743 last_read_token = WORD;4759 last_read_token = orig_last_token; /* XXX - was WORD? */ 4744 4760 if (wl) 4745 4761 { 4746 4762 rl = REVERSE_LIST (wl, WORD_LIST *); … … 4752 4768 4753 4769 if (retlenp) 4754 4770 *retlenp = (ret && *ret) ? strlen (ret) : 0; 4771 4772 if (assignok) 4773 parser_state |= PST_ASSIGNOK; 4774 4755 4775 return ret; 4756 4776 } 4757 4777 -
patchlevel.h
diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
old new 25 25 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 26 26 looks for to find the patch level (for the sccs version string). */ 27 27 28 #define PATCHLEVEL 028 #define PATCHLEVEL 11 29 29 30 30 #endif /* _PATCHLEVEL_H_ */ -
subst.c
diff -Naur bash-3.1.orig/subst.c bash-3.1/subst.c
old new 2187 2187 if (mklocal && variable_context) 2188 2188 { 2189 2189 v = find_variable (name); 2190 if (v == 0 || array_p (v) == 0 )2190 if (v == 0 || array_p (v) == 0 || v->context != variable_context) 2191 2191 v = make_local_array_variable (name); 2192 2192 v = assign_array_var_from_string (v, value, flags); 2193 2193 } … … 6795 6795 if (temp && *temp && t_index > 0) 6796 6796 { 6797 6797 temp1 = bash_tilde_expand (temp, tflag); 6798 if (temp1 && *temp1 == '~' && STREQ (temp, temp1)) 6799 { 6800 FREE (temp); 6801 FREE (temp1); 6802 goto add_character; /* tilde expansion failed */ 6803 } 6798 6804 free (temp); 6799 6805 temp = temp1; 6800 6806 sindex += t_index; -
variables.c
diff -Naur bash-3.1.orig/variables.c bash-3.1/variables.c
old new 860 860 { 861 861 char val[INT_STRLEN_BOUND(int) + 1], *v; 862 862 863 #if defined (READLINE) 863 864 /* If we are currently assigning to LINES or COLUMNS, don't do anything. */ 864 865 if (winsize_assignment) 865 866 return; 867 #endif 866 868 867 869 v = inttostr (lines, val, sizeof (val)); 868 870 bind_variable ("LINES", v, 0);
Note:
See TracBrowser
for help on using the repository browser.