summaryrefslogtreecommitdiff
path: root/debian/patches/bash32-015.dpatch
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-04-09 16:13:32 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-04-09 16:15:01 -0700
commit2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch)
treeac5e0b67043c50f49160e9fe407435706cf30444 /debian/patches/bash32-015.dpatch
parentf1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff)
downloadvyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz
vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash with Vyatta changes.
Diffstat (limited to 'debian/patches/bash32-015.dpatch')
-rw-r--r--debian/patches/bash32-015.dpatch114
1 files changed, 114 insertions, 0 deletions
diff --git a/debian/patches/bash32-015.dpatch b/debian/patches/bash32-015.dpatch
new file mode 100644
index 0000000..398456c
--- /dev/null
+++ b/debian/patches/bash32-015.dpatch
@@ -0,0 +1,114 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: bash-3.2 upstream patch bash32-015
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.2
+Patch-ID: bash32-015
+
+Bug-Reported-by:
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+Under certain circumstances, when using FIFOs for process substitution,
+bash fails to unlink the FIFOs. This leaves open file descriptors that
+can cause the shell to hang and litters the file system.
+
+Patch:
+
+*** ../bash-3.2-patched/execute_cmd.c Fri Mar 2 16:20:50 2007
+--- execute_cmd.c Wed Jan 31 23:12:06 2007
+***************
+*** 3051,3054 ****
+--- 3051,3059 ----
+ command_line = savestring (the_printed_command_except_trap);
+
++ #if defined (PROCESS_SUBSTITUTION)
++ if ((subshell_environment & SUBSHELL_COMSUB) && (simple_command->flags & CMD_NO_FORK) && fifos_pending() > 0)
++ simple_command->flags &= ~CMD_NO_FORK;
++ #endif
++
+ execute_disk_command (words, simple_command->redirects, command_line,
+ pipe_in, pipe_out, async, fds_to_close,
+*** ../bash-3.2-patched/subst.c Fri Mar 2 16:20:50 2007
+--- subst.c Tue Mar 6 11:40:55 2007
+***************
+*** 4129,4132 ****
+--- 4151,4160 ----
+ }
+
++ int
++ fifos_pending ()
++ {
++ return nfifo;
++ }
++
+ static char *
+ make_named_pipe ()
+***************
+*** 4178,4181 ****
+--- 4206,4215 ----
+ }
+
++ int
++ fifos_pending ()
++ {
++ return 0; /* used for cleanup; not needed with /dev/fd */
++ }
++
+ void
+ unlink_fifo_list ()
+***************
+*** 4671,4674 ****
+--- 4719,4725 ----
+ last_command_exit_value = rc;
+ rc = run_exit_trap ();
++ #if defined (PROCESS_SUBSTITUTION)
++ unlink_fifo_list ();
++ #endif
+ exit (rc);
+ }
+*** ../bash-3.2-patched/subst.h Tue Sep 19 08:34:41 2006
+--- subst.h Wed Jan 10 09:46:47 2007
+***************
+*** 223,226 ****
+--- 223,227 ----
+ extern char *pat_subst __P((char *, char *, char *, int));
+
++ extern int fifos_pending __P((void));
+ extern void unlink_fifo_list __P((void));
+
+*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
+--- patchlevel.h Mon Oct 16 14:22:54 2006
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */