On 4/30/24 12:35 PM, Robert Elz wrote:
Date: Tue, 30 Apr 2024 10:29:43 -0400 From: Chet Ramey <chet.ra...@case.edu> Message-ID: <958687ce-7e36-42d1-a82e-6101fc777...@case.edu>| That's an interpretation. I might buy it if the DESCRIPTION didn't say | | "When jobs reports the termination status of a job, the shell shall remove | the job from the background jobs list ..." | | which implies that it's `jobs' doing the reporting. No, it implies nothing of the kind. It says what happens when jobs reports the termination status, it doesn't say, or imply, that the thing that happens (removing the job) only happens when the jobs command is run, which would imply that it needs to be.
It's the reporting part we're talking about here, not the removing.
But beyond that, ask yourself, what is a foreground job doing on the background jobs list?
It's a jobs list. Things hang around in there until the user gets notified, whether before the next interactive shell prompt, as POSIX specifies, or before the next command is executed in a non-interactive shell. But of course, that's a dodge, nobody does it that way. Everyone reports on foreground job termination before the next command in a list. The question is whether you do it before word expansion or after. But I think we're getting to agreement here. -- ``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature