[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool should be interruptible
From: |
Behdad Esfahbod |
Subject: |
Re: gnulib-tool should be interruptible |
Date: |
Fri, 22 Sep 2006 19:42:54 -0400 |
On Wed, 2006-09-20 at 15:43 -0400, Ralf Wildenhues wrote:
> [ Behdad, this is:
> http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00221.html ]
>
> Hello Paul,
>
> * Paul Eggert wrote on Tue, Sep 19, 2006 at 06:10:07PM CEST:
> > Ralf Wildenhues <address@hidden> writes:
> >
> > > * gnulib-tool (func_version): Create output all at once, to
> > > avoid triggering unnecessary SIGPIPEs.
> >
> > gnulib-tool doesn't trap SIGPIPE before invoking that code, so you
> > must be worried about the case where the caller traps SIGPIPE?
>
> Hmm, actually I have no idea whether that was the case with the bug
> reported against libtool. Behdad, does tinderbox trap SIGPIPE?
I don't think so. In fact, I'm not even sure how that message is being
generated in a shell script. I can reproduce it in my interactive
shell:
$ echo | true
bash: echo: write error: Broken pipe
but not in a script, or even in a pipeline that has to fork:
$ { echo; echo; } | true
$
However, it surely does interrupt the script:
address@hidden src]$ time { sleep 1; echo; echo; } | true
real 0m1.008s
user 0m0.004s
sys 0m0.000s
address@hidden src]$ time { echo; sleep 1; echo; } | true
real 0m0.003s
user 0m0.000s
sys 0m0.000s
Anyway, the changes made are safe and should fix most of the problem.
Thanks,
--
behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"