Date: Wed, 14 Aug 2024 15:21:44 -0400 From: Chet Ramey <chet.ra...@case.edu> Message-ID: <1413a9a0-cbef-44c5-8072-a3be7294e...@case.edu>
| I'm not sure returning the status of some random process from some | arbitrary point in the past is going to be valuable. Not "some random process" but a process that has terminated, and hasn't been waited upon before (and which hasn't been notified as complete via an explicit user execution of the "jobs" command or the implicit "jobs" which runs just before each PS1 output in an interactive shell). | Maybe the thing to do is to retain jobs in the job list, even after | they're marked as notified, I'd do the opposite, once they're notified, they should be deleted from the jobs table, and everywhere else. But "notified" only happens when the script explicitly asks (in a non-interactive shell, never because of any other event than an appropriate command issued by the script, and in an interactive shell, the same, or the implicit "jobs" before each PS1). Once deleted, they're gone, and there's no way to get data from them, ever again. This should not require any magic options. If something is notified because it has stopped, rather than terminated (which with "wait" really should require a new wait option) then obviously it isn't removed, but still cannot be waited upon again until after it has resumed running, and then stopped/terminated after that (resumed includes for the very briefest instant if the job is killed while stopped). kre