[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: |
Chet Ramey |
Subject: |
Re: Terminal stop when a group of pipelines is piped to a pager |
Date: |
Wed, 28 Sep 2016 13:56:41 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/