[Top][All Lists]

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

Bogus SIGPIPE bug

From: Thomas Hood
Subject: Bogus SIGPIPE bug
Date: Fri, 23 Aug 2013 16:17:30 +0200

I have isolated a bug in bash 3.2 which doesn't appear in later
versions of bash I have tried; now I am trying to figure out when
where the bug got fixed so I can make an upgrade plan. I am using SLES
11 SP2.

To reproduce the issue do the following.
* Block SIGPIPE in the current process.
* From the current process, start bash interactively. (The new bash
process also has SIGPIPE blocked.)
* In the latter bash process, run a test program. (The new
test-program process also has SIGPIPE blocked.)

The latter process sees a pending SIGPIPE supposedly sent by itself.
If it unblocks SIGPIPE then it receives this signal immediately.

If the test program is started in various unusual ways such as the
following then it does NOT receive SIGPIPE:

    bash -c '{ test ; }'
    bash -c ': ; test'
    bash -c 'test ; :'
    ( { test ; } )
    ( test ; : )
    echo test | bash -s

whereas it DOES receive SIGPIPE if it as started as follows.

    bash -c test
    ( test )
    ( test ; )
    { test ; }

I have searched in the mailing list archives and looked in the bash
docs but haven't found a clue as to where this bug was fixed. Does
this ring a bell with anyone or is this most likely a distro-specific


$ bash --version
GNU bash, version 3.2.51(1)-release (x86_64-suse-linux-gnu)
> rpm -q -a|grep bash
$ cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 SP2  (x86_64) - Kernel \r (\l).

I attach the test program I use.
Thomas Hood
RAAF Technology bv

Attachment: unblock-catch-sigpipe.c
Description: Text Data

reply via email to

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