bug-bash
[Top][All Lists]
Advanced

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

Re: Terminal stop when a group of pipelines is piped to a pager


From: Abhijit Dasgupta
Subject: Re: Terminal stop when a group of pipelines is piped to a pager
Date: Sat, 1 Oct 2016 06:25:44 +0000 (UTC)

Well, on second thought, it seems that the issue I originally reported may be 
related to a bash bug after all:  It occurs whenever "set -o functrace" and 
"trap '...' DEBUG" are both in place, and can be reproduced as follows:

set -o functrace
trap ':' DEBUG
{ date; who | sort; } | more          # Gets stopped
{ who | sort; date; } | more          # Works fine


The issue looks related to

http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00006.html





On Wednesday, September 28, 2016 3:27 PM, Abhijit Dasgupta <address@hidden> 
wrote:

I am very sorry but this issue was due to my setup of the bash preexec hack 
[1], not due to bash. My apologies.


[1] http://www.twistedmatrix.com/users/glyph/preexec.bash.txt



On Wednesday, September 28, 2016 1:56 PM, Chet Ramey <address@hidden> wrote:
On 9/28/16 3:35 AM, Abhijit Dasgupta wrote:


> Bash Version: 4.3
> Patch Level: 11
> Release Status: release
> 
> Description:
> 
>   The following stopping issue is seen in recent bash versions:
> 
>     $ { cmd_a; cmd_b | cmd_c; } | pager_prog
> 
>     [1]+  Stopped                  { cmd_a; cmd_b | cmd_c; } | pager_prog
> 
>   What is seen:  If a group of commands (in the above form) has its output
>   piped to a pager program (e.g. more, less, etc), then they get stopped
>   (by a SIGTTIN/SIGTTOU signal, while pager_prog accesses the tty).  This
>   happens if the first command of the group (cmd_a) is not a bash builtin
>   AND a pipeline occurs later in the group (cmd_b | cmd_c).
> 
>   Puzzlingly, the issue does not arise if in the command group either the
>   first command (cmd_a) is a bash builtin or if none of the later commands
>   contains a pipe.

I can't reproduce this on Ubuntu using bash-4.3.11, bash-4.3.46, or bash-4.4.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
         ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/


reply via email to

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