bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGPIPE not properly reset with 'trap - PIPE'


From: Ralf Wildenhues
Subject: Re: SIGPIPE not properly reset with 'trap - PIPE'
Date: Thu, 11 Dec 2008 19:11:48 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Andreas,

* Andreas Schwab wrote on Thu, Dec 11, 2008 at 10:13:18AM CET:
> Ralf Wildenhues <address@hidden> writes:
> 
> > foo: line 20: echo: write error: Broken pipe
> > foo: line 21: echo: write error: Broken pipe

> > Please also note that the above errors occur also when
> >   trap '' PIPE
> >
> > is used instead of 'trap - PIPE'.
> 
> You probably have SIGPIPE ignored when you start the script.  From
> POSIX:
> 
>     Signals that were ignored on entry to a non-interactive shell cannot
>     be trapped or reset, although no error need be reported when
>     attempting to do so.

That may well be, but if SIGPIPE is ignored upon script startup, then
the shell should not output those error messages upon receiving the
signal in the first place, no?

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]