lex@upc.ua wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
> -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -O2 -g
> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic
> uname output: Linux fiber.upc.intranet 2.6.20-1.2320.fc5 #1 SMP Tue Jun 12
> 18:50:49 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-redhat-linux-gnu
>
> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
>
> Note: Configuration Information is irrelevant -- same bug in all
> versions(3.1-4.0 inclusive)/OSes(linux,tru64)/machines(alpha,i686,x86_64).
>
> Description:
> {trap "/external/program" DEBUG} breaks pipelining in some ways. When
> trap is set:
>
> 1. A | B pipeline sometimes(*) does not run(**) second part and hungs
> forever.
> sometimes SIGINT(Ctrl+C) revives it, and second part starts.
> (*) in my observation it depends on time, 'A' takes to complete --
> "small" tasks does not triggers that behaviour.
> (**) trap for the "B" part is called, but not the command "B"
> itself
> 2. A & B breaks job control
> 3. (may be not a bug) "$_" no longer contains last arg.
This was interesting. See if the attached patch fixes 1 and 2.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/