On 7/7/23 12:43 PM, Grisha Levit wrote:
The fix [1] for the issue reported in [2]:

+ give the terminal to pipeline_pgrp. We don't give the terminal
+ back to shell_pgrp if an async job exits because we never gave it
+ to that job in the first place. */
        if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
+  (job == NO_JOB || IS_ASYNC (job) == 0) &&
    (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
   give_terminal_to (shell_pgrp, 0);

makes bash not take the terminal back when an async job is brought to the
foreground with `fg' and then subsequently TSTP-ed.

Thanks for the report; easy fix.

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/


Reply via email to