John Vandenberg wrote:
On 9/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:Unless compiled specially just to avoid it, bash gives an occasional disconcerting (but spurious) warning when a process at the receiving side of a shell pipe closes before the sender has flushed all of its data. `quilt refresh' is particularly prone. This patch simply redirects stderr to /dev/null in the one instance that seems to be the root of the problem, and thus saves the bother of recompiling bash.Gary,I haven't noticed this problem on OS X 10.3.2, using bash 2.05b.0(1). If I understand correctly, the following simple case shoulddemonstrate the problem? $ (echo foo; i=1; for ((i = 0; i < 100; i++)); do sleep 1; done) | awk '{ exit }'
Nope, this doesn't error out on Apple's bash. This does (I think there needs to be a separate long running non-shell process generating the output): $ cvs diff | (exit 1)
If not, could you provide a more complicated case that does cause report the error, as I would like to see the problem here, or know what is different.
There is a compile time option to bash (DONT_REPORT_SIGPIPE) which turns off the error message, but it is not part of the default build, so many vendor supplied and self built bash installations exhibit the problem.
If there is such a fundamental problem with bash on 10.4.2, a configure test to reject that build of bash would be a simpler fix.
It's not just Apple's bash :-( Here is a different workaround that
might be less contentious (my mailer will almost certainly wrap long
lines, so you'll need to apply by hand):
Index: quilt-HEAD/scripts/patchfns.in
===================================================================
--- quilt-HEAD.orig/scripts/patchfns.in
+++ quilt-HEAD/scripts/patchfns.in
@@ -607,7 +607,8 @@ patch_header()
{
@AWK@ '
$1 == "***" || $1 == "---" \
- { exit }
+ { stop=1 }
+ stop { next }
/^Index:[ \t]|^diff[ \t]|^==*$|^RCS file: |^retrieving revision
[0-9]+(\.[0-9]+)*$/ \
{ eat = eat $0 "\n"
next }
Cheers,
Gary.
--
Gary V. Vaughan ())_. [EMAIL PROTECTED],gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
