From: Eric Blake Date: Mon, 22 Feb 2010 22:15:56 +0000 (-0700) Subject: lseek: avoid bash 3.2 broken pipe bug X-Git-Tag: v0.1~4594 X-Git-Url: https://erislabs.net/gitweb/?a=commitdiff_plain;h=e2acc5db9572b477a9ba0fdcdf9e38e235281ca0;p=gnulib.git lseek: avoid bash 3.2 broken pipe bug Avoid a spurious message caused by SIGPIPE handling, as well as avoiding bash 3.2 messages even when SIGPIPE is not handled. * m4/lseek.m4 (gl_FUNC_LSEEK): Drain pipe, to avoid spurious warning from bash 3.2. Reported by Ben Pfaff, with analysis from Bruno Haible. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index ddb7216d2..892c85e1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-22 Eric Blake + lseek: avoid bash 3.2 broken pipe bug + * m4/lseek.m4 (gl_FUNC_LSEEK): Drain pipe, to avoid spurious + warning from bash 3.2. + Reported by Ben Pfaff, with analysis from Bruno Haible. + bootstrap: support non-FSF copyright holder * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow bootstrap.conf override of COPYRIGHT_HOLDER. diff --git a/m4/lseek.m4 b/m4/lseek.m4 index f3084957c..9bf4dc2d0 100644 --- a/m4/lseek.m4 +++ b/m4/lseek.m4 @@ -1,4 +1,4 @@ -# lseek.m4 serial 4 +# lseek.m4 serial 5 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,8 @@ int main () }], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ - && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then + && test 1 = "`echo hi \ + | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no