On 12/17/22 3:59 PM, ks1322 ks1322 wrote:
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-prote>
uname output: Linux yourdomain.com 6.0.12-300.fc37.x86_64 #1 SMP
PREEMPT_DYNAMIC Thu Dec 8 16:58:47 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu
Bash Version: 5.2
Patch Level: 9
Release Status: release
Description:
When for loop output is piped to less and Ctrl+C is pressed, bash creates
unexpected stopped job
Thanks, I'll take a look. `less' gets the SIGTTOU because it tries to set
the terminal attributes after the process group leader has already given
the terminal back to the original (parent shell) process group. The issue
is that it needs to wait until `less' has finished before doing that, or
not do it at all and let the parent shell do it after `less' has exited.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/