bug-bash
[Top][All Lists]
Advanced

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

Re: Should $(fg) resume a stopped job?


From: Chet Ramey
Subject: Re: Should $(fg) resume a stopped job?
Date: Mon, 3 Aug 2020 15:41:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 7/31/20 12:43 PM, O─čuz wrote:

>     Maybe a minor bug, but certainly a choice. The command substitution keeps
>     the jobs list around, since the subshell is supposed to be an exact copy 
> of
>     the parent, and it's useful to get the output of `jobs' out of command
>     substitution.
> 
>     You just can't expect to do anything with any of those jobs, since the
>     command substitution shell is not the parent of any of them. It would
>     make sense to have `fg' complain about that.
> 
> 
> Right, it would. bosh behaves the same way as bash btw.

Behavior is mixed. I put in something that should produce an error when you
try to use `fg' or `bg' in a command substitution without having done
anything to enable job control first.

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://tiswww.cwru.edu/~chet/



reply via email to

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