[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGPIPE not properly reset with 'trap - PIPE'
From: |
Bob Proulx |
Subject: |
Re: SIGPIPE not properly reset with 'trap - PIPE' |
Date: |
Thu, 11 Dec 2008 14:37:42 -0700 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi Ralf!
Andreas Schwab wrote:
> Ralf Wildenhues writes:
> > I noticed the following bash bug when using gnulib-tool. The script
> > below outputs
> >
> > 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.
This sounds very familiar... Are you suffering from this bug?
http://lists.gnu.org/archive/html/bug-coreutils/2007-11/msg00154.html
There Jim Meyering wrote (abbreviated):
> I've tracked it down.
> mingetty exec's /bin/login, which calls pam stuff, which in turn uses
> libdbus. And that is the culprit:
>
> ./dbus/dbus-sysdeps-unix.c-_dbus_disable_sigpipe (void)
> ./dbus/dbus-sysdeps-unix.c-{
> ./dbus/dbus-sysdeps-unix.c: signal (SIGPIPE, SIG_IGN);
> ./dbus/dbus-sysdeps-unix.c-}
Bob