Re: [patch] fix "broken pipe" message from lseek test

2010-02-22 Thread Eric Blake
According to Bruno Haible on 2/20/2010 7:56 PM: >> test `echo hi | { ./conftest$ac_exeext; echo $?; cat > /dev/null; }` = 1 > > I like this too, in this case. Then I will be committing this: -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net From 03b453

Re: [patch] fix "broken pipe" message from lseek test

2010-02-21 Thread Bruno Haible
Hi Ben, Thanks for this analysis. > Default handling of SIGPIPE > --- > > b...@blp:~/tmp(0)$ strace -o foo -f bash > b...@blp:~/tmp(0)$ trap - SIGPIPE > b...@blp:~/tmp(0)$ grep ^Sig /proc/$$/status > SigQ: 1/16382 > SigPnd: > Sig

Re: [patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Ben Pfaff
Bruno Haible writes: > Ben Pfaff wrote: >> I still see the "broken pipe" error with it. > > Could you please investigate, by using strace, looking at signal masks of > processes, etc.? This "broken pipe" issue in bash is becoming extremely > unsatisfying. We have the world-class shell programming

Re: [patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Bruno Haible
Eric Blake wrote: > shorter than Bruno's proposal, and does not > have to worry about shell signal handling (which is somewhat difficult to > do portably): > > > - && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then > > test `echo hi | { ./conftest$ac_exeext; echo $?; cat > /dev

Re: [patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Eric Blake
According to Bruno Haible on 2/20/2010 1:23 PM: > Hi Ben, > > Below is a proposed fix (untested). Or maybe this would be better, by creating a subsidiary process to drain off the pipe (at which point, you have to be careful about how $? is tested). Also untested, but shorter than Bruno's proposa

Re: [patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Ben Pfaff
Bruno Haible writes: >> I noticed that (sometimes?) the lseek check prints a "broken >> pipe" message in the middle of "configure" output, e.g. >> checking whether lseek detects pipes... ../configure: line 30326: >> echo: write error: Broken pipe >> as reported here under step 19: >>

Re: [patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Bruno Haible
Hi Ben, > I noticed that (sometimes?) the lseek check prints a "broken > pipe" message in the middle of "configure" output, e.g. > checking whether lseek detects pipes... ../configure: line 30326: > echo: write error: Broken pipe > as reported here under step 19: > http://benpfaff

[patch] fix "broken pipe" message from lseek test

2010-02-20 Thread Ben Pfaff
Hi Eric. I noticed that (sometimes?) the lseek check prints a "broken pipe" message in the middle of "configure" output, e.g. checking whether lseek detects pipes... ../configure: line 30326: echo: write error: Broken pipe as reported here under step 19: http://benpfaff.org/~blp/p