Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 1070a2deb63ce82f5ce180809f27db037f1e3e3c)
+++ BOOK/introduction/common/changelog.xml	(revision 96f80a41366892d11cd24b05ac23d8b4599d6a84)
@@ -41,4 +41,7 @@
       <para>January 8, 2011</para>
       <itemizedlist>
+        <listitem>
+          <para>[jciccone] - Updated the Bash Branch Update to -2.</para>
+        </listitem>
         <listitem>
           <para>[jciccone] - Updated CLooG-PPL to 0.15.10.</para>
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 1070a2deb63ce82f5ce180809f27db037f1e3e3c)
+++ BOOK/patches.ent	(revision 96f80a41366892d11cd24b05ac23d8b4599d6a84)
@@ -5,6 +5,6 @@
 <!-- Start of Common Patches -->
 
-<!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-1.patch">
-<!ENTITY bash-branch_update-patch-md5 "ba6107bdbe9cf7533e3a47e6a92eb4db">
+<!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-2.patch">
+<!ENTITY bash-branch_update-patch-md5 "7645587a6efcefa67936dcaeb9b2bee7">
 <!ENTITY bash-branch_update-patch-size "8 KB">
 
Index: tches/bash-4.1-branch_update-1.patch
===================================================================
--- patches/bash-4.1-branch_update-1.patch	(revision 1070a2deb63ce82f5ce180809f27db037f1e3e3c)
+++ 	(revision )
@@ -1,141 +1,0 @@
-Submitted By: Joe Ciccone <jciccone@gmail.com>
-Date: 07-25-2010
-Initial Package Version: 4.1
-Origin: Upstream
-Upstream Status: From Upstream
-Description: Contains all upstream patches up to 4.1-007
-
-diff -Naur bash-4.1.orig//bashline.c bash-4.1/bashline.c
---- bash-4.1.orig//bashline.c	2009-10-24 14:10:19.000000000 -0400
-+++ bash-4.1/bashline.c	2010-07-25 22:04:42.669952245 -0400
-@@ -1680,7 +1680,7 @@
-      a single match (multiple matches that end up reducing the number of
-      characters in the common prefix are bad) will ever be returned on
-      regular completion. */
--  if (glob_pattern_p (hint))
-+  if (globpat)
-     {
-       if (state == 0)
- 	{
-diff -Naur bash-4.1.orig//builtins/printf.def bash-4.1/builtins/printf.def
---- bash-4.1.orig//builtins/printf.def	2009-11-20 15:31:23.000000000 -0500
-+++ bash-4.1/builtins/printf.def	2010-07-25 22:04:42.685951678 -0400
-@@ -117,7 +117,7 @@
-     else if (have_fieldwidth) \
-       nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \
-     else if (have_precision) \
--      nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \
-+      nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \
-     else \
-       nw = vflag ? vbprintf (f, func) : printf (f, func); \
-     tw += nw; \
-@@ -172,7 +172,7 @@
- #endif
- 
- #if !HAVE_VSNPRINTF
--extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4)));
-+extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
- #endif
- 
- static void printf_erange __P((char *));
-diff -Naur bash-4.1.orig//builtins/read.def bash-4.1/builtins/read.def
---- bash-4.1.orig//builtins/read.def	2009-10-08 11:35:46.000000000 -0400
-+++ bash-4.1/builtins/read.def	2010-07-25 22:04:42.673839182 -0400
-@@ -615,14 +615,15 @@
-   if (unbuffered_read == 0)
-     zsyncfd (fd);
- 
--  interrupt_immediately--;
--  terminate_immediately--;
-   discard_unwind_frame ("read_builtin");
- 
-   retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
- 
- assign_vars:
- 
-+  interrupt_immediately--;
-+  terminate_immediately--;
-+
- #if defined (ARRAY_VARS)
-   /* If -a was given, take the string read, break it into a list of words,
-      an assign them to `arrayname' in turn. */
-diff -Naur bash-4.1.orig//lib/readline/complete.c bash-4.1/lib/readline/complete.c
---- bash-4.1.orig//lib/readline/complete.c	2009-11-29 18:39:30.000000000 -0500
-+++ bash-4.1/lib/readline/complete.c	2010-07-25 22:04:42.669952245 -0400
-@@ -2138,7 +2138,7 @@
- 	 All other entries except "." and ".." match. */
-       if (filename_len == 0)
- 	{
--	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
-+	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
- 	    continue;
- 
- 	  if (convfn[0] != '.' ||
-@@ -2219,7 +2219,7 @@
- 		temp[dirlen++] = '/';
- 	    }
- 
--	  strcpy (temp + dirlen, entry->d_name);
-+	  strcpy (temp + dirlen, convfn);
- 	}
-       else
- 	temp = savestring (convfn);
-diff -Naur bash-4.1.orig//patchlevel.h bash-4.1/patchlevel.h
---- bash-4.1.orig//patchlevel.h	2009-10-01 16:39:22.000000000 -0400
-+++ bash-4.1/patchlevel.h	2010-07-25 22:04:42.689952400 -0400
-@@ -25,6 +25,6 @@
-    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
- 
--#define PATCHLEVEL 0
-+#define PATCHLEVEL 7
- 
- #endif /* _PATCHLEVEL_H_ */
-diff -Naur bash-4.1.orig//print_cmd.c bash-4.1/print_cmd.c
---- bash-4.1.orig//print_cmd.c	2009-09-16 15:32:26.000000000 -0400
-+++ bash-4.1/print_cmd.c	2010-07-25 22:04:42.677952146 -0400
-@@ -113,6 +113,12 @@
- 
- #define CHECK_XTRACE_FP	xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
- 
-+#define PRINT_DEFERRED_HEREDOCS(x) \
-+  do { \
-+    if (deferred_heredocs) \
-+      print_deferred_heredocs (x); \
-+  } while (0)
-+
- /* Non-zero means the stuff being printed is inside of a function def. */
- static int inside_function_def;
- static int skip_this_indent;
-@@ -560,13 +566,15 @@
-      FOR_COM *for_command;
- {
-   print_for_command_head (for_command);
--
-   cprintf (";");
-   newline ("do\n");
-+
-   indentation += indentation_amount;
-   make_command_string_internal (for_command->action);
-+  PRINT_DEFERRED_HEREDOCS ("");
-   semicolon ();
-   indentation -= indentation_amount;
-+
-   newline ("done");
- }
- 
-diff -Naur bash-4.1.orig//variables.c bash-4.1/variables.c
---- bash-4.1.orig//variables.c	2009-11-03 14:13:58.000000000 -0500
-+++ bash-4.1/variables.c	2010-07-25 22:04:42.673839182 -0400
-@@ -3808,6 +3808,11 @@
- 
-   if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
-     {
-+      /* Make sure we have a hash table to store the variable in while it is
-+	 being propagated down to the global variables table.  Create one if
-+	 we have to */
-+      if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
-+	shell_variables->table = hash_create (0);
-       /* XXX - should we set v->context here? */
-       v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
-       if (shell_variables == global_variables)
Index: patches/bash-4.1-branch_update-2.patch
===================================================================
--- patches/bash-4.1-branch_update-2.patch	(revision 96f80a41366892d11cd24b05ac23d8b4599d6a84)
+++ patches/bash-4.1-branch_update-2.patch	(revision 96f80a41366892d11cd24b05ac23d8b4599d6a84)
@@ -0,0 +1,166 @@
+Submitted By: Joe Ciccone <jciccone@gmail.com>
+Date: 01-08-2011
+Initial Package Version: 4.1
+Origin: Upstream
+Upstream Status: From Upstream
+Description: Contains all upstream patches up to 4.1-009
+
+diff -Naur bash-4.1.orig//bashline.c bash-4.1/bashline.c
+--- bash-4.1.orig//bashline.c	2009-10-24 14:10:19.000000000 -0400
++++ bash-4.1/bashline.c	2011-01-08 15:59:31.934906851 -0500
+@@ -1680,7 +1680,7 @@
+      a single match (multiple matches that end up reducing the number of
+      characters in the common prefix are bad) will ever be returned on
+      regular completion. */
+-  if (glob_pattern_p (hint))
++  if (globpat)
+     {
+       if (state == 0)
+ 	{
+diff -Naur bash-4.1.orig//builtins/declare.def bash-4.1/builtins/declare.def
+--- bash-4.1.orig//builtins/declare.def	2009-11-25 19:42:00.000000000 -0500
++++ bash-4.1/builtins/declare.def	2011-01-08 15:59:58.930671218 -0500
+@@ -512,7 +512,7 @@
+ 	    {
+ 	      /* let bind_{array,assoc}_variable take care of this. */
+ 	      if (assoc_p (var))
+-		bind_assoc_variable (var, name, "0", value, aflags);
++		bind_assoc_variable (var, name, savestring ("0"), value, aflags);
+ 	      else
+ 		bind_array_variable (name, 0, value, aflags);
+ 	    }
+diff -Naur bash-4.1.orig//builtins/printf.def bash-4.1/builtins/printf.def
+--- bash-4.1.orig//builtins/printf.def	2009-11-20 15:31:23.000000000 -0500
++++ bash-4.1/builtins/printf.def	2011-01-08 15:59:31.934906851 -0500
+@@ -117,7 +117,7 @@
+     else if (have_fieldwidth) \
+       nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \
+     else if (have_precision) \
+-      nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \
++      nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \
+     else \
+       nw = vflag ? vbprintf (f, func) : printf (f, func); \
+     tw += nw; \
+@@ -172,7 +172,7 @@
+ #endif
+ 
+ #if !HAVE_VSNPRINTF
+-extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4)));
++extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
+ #endif
+ 
+ static void printf_erange __P((char *));
+diff -Naur bash-4.1.orig//builtins/read.def bash-4.1/builtins/read.def
+--- bash-4.1.orig//builtins/read.def	2009-10-08 11:35:46.000000000 -0400
++++ bash-4.1/builtins/read.def	2011-01-08 15:59:31.934906851 -0500
+@@ -615,14 +615,15 @@
+   if (unbuffered_read == 0)
+     zsyncfd (fd);
+ 
+-  interrupt_immediately--;
+-  terminate_immediately--;
+   discard_unwind_frame ("read_builtin");
+ 
+   retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
+ 
+ assign_vars:
+ 
++  interrupt_immediately--;
++  terminate_immediately--;
++
+ #if defined (ARRAY_VARS)
+   /* If -a was given, take the string read, break it into a list of words,
+      an assign them to `arrayname' in turn. */
+diff -Naur bash-4.1.orig//lib/readline/complete.c bash-4.1/lib/readline/complete.c
+--- bash-4.1.orig//lib/readline/complete.c	2009-11-29 18:39:30.000000000 -0500
++++ bash-4.1/lib/readline/complete.c	2011-01-08 15:59:31.934906851 -0500
+@@ -2138,7 +2138,7 @@
+ 	 All other entries except "." and ".." match. */
+       if (filename_len == 0)
+ 	{
+-	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
++	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
+ 	    continue;
+ 
+ 	  if (convfn[0] != '.' ||
+@@ -2219,7 +2219,7 @@
+ 		temp[dirlen++] = '/';
+ 	    }
+ 
+-	  strcpy (temp + dirlen, entry->d_name);
++	  strcpy (temp + dirlen, convfn);
+ 	}
+       else
+ 	temp = savestring (convfn);
+diff -Naur bash-4.1.orig//patchlevel.h bash-4.1/patchlevel.h
+--- bash-4.1.orig//patchlevel.h	2009-10-01 16:39:22.000000000 -0400
++++ bash-4.1/patchlevel.h	2011-01-08 16:00:00.782985562 -0500
+@@ -25,6 +25,6 @@
+    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
+    looks for to find the patch level (for the sccs version string). */
+ 
+-#define PATCHLEVEL 0
++#define PATCHLEVEL 9
+ 
+ #endif /* _PATCHLEVEL_H_ */
+diff -Naur bash-4.1.orig//print_cmd.c bash-4.1/print_cmd.c
+--- bash-4.1.orig//print_cmd.c	2009-09-16 15:32:26.000000000 -0400
++++ bash-4.1/print_cmd.c	2011-01-08 15:59:31.938922841 -0500
+@@ -113,6 +113,12 @@
+ 
+ #define CHECK_XTRACE_FP	xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
+ 
++#define PRINT_DEFERRED_HEREDOCS(x) \
++  do { \
++    if (deferred_heredocs) \
++      print_deferred_heredocs (x); \
++  } while (0)
++
+ /* Non-zero means the stuff being printed is inside of a function def. */
+ static int inside_function_def;
+ static int skip_this_indent;
+@@ -560,13 +566,15 @@
+      FOR_COM *for_command;
+ {
+   print_for_command_head (for_command);
+-
+   cprintf (";");
+   newline ("do\n");
++
+   indentation += indentation_amount;
+   make_command_string_internal (for_command->action);
++  PRINT_DEFERRED_HEREDOCS ("");
+   semicolon ();
+   indentation -= indentation_amount;
++
+   newline ("done");
+ }
+ 
+diff -Naur bash-4.1.orig//sig.c bash-4.1/sig.c
+--- bash-4.1.orig//sig.c	2009-08-14 16:31:52.000000000 -0400
++++ bash-4.1/sig.c	2011-01-08 16:00:00.782985562 -0500
+@@ -655,6 +655,9 @@
+     act.sa_flags |= SA_INTERRUPT;	/* XXX */
+   else
+     act.sa_flags |= SA_RESTART;		/* XXX */
++#else
++  if (sig == SIGCHLD)
++    act.sa_flags |= SA_RESTART;
+ #endif
+   sigemptyset (&act.sa_mask);
+   sigemptyset (&oact.sa_mask);
+diff -Naur bash-4.1.orig//variables.c bash-4.1/variables.c
+--- bash-4.1.orig//variables.c	2009-11-03 14:13:58.000000000 -0500
++++ bash-4.1/variables.c	2011-01-08 15:59:31.938922841 -0500
+@@ -3808,6 +3808,11 @@
+ 
+   if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
+     {
++      /* Make sure we have a hash table to store the variable in while it is
++	 being propagated down to the global variables table.  Create one if
++	 we have to */
++      if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
++	shell_variables->table = hash_create (0);
+       /* XXX - should we set v->context here? */
+       v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
+       if (shell_variables == global_variables)
