On 10/17/24 11:27 PM, Robert Elz wrote:

When an interactive shell notifies the user before printing a prompt that
a job is now Done - that job should be removed (from everywhere).

It all boils down to what POSIX says about this, and what shells do. I
think I did a survey of existing implementations in one of my previous
replies, but I can't find it right now. I think all the ash-based shells,
at least, make the job unavailable to `wait'. That is, basically, this:

$ sleep 2 & jobs -p
66433
$
[1] + Done                       sleep 2
$ wait 66433
$ echo $?
127

(I waited a few seconds at the prompt, then hit return to generate the
notification.)

Other shells (bash, ksh93, mksh at least) make the pid available to
`wait', at least once.

I don't think we need to talk about this particular aspect of this any
more. It's pretty clear there is a difference, and it's pretty clear
people aren't going to change their minds.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to