Liste des Groupes |
On 2024-10-04, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>What? Scripting should not go anywhere near POSIX job control, which is>
an interactive feature that requires a terminal session.
Well, there _is_ set -m.
And how will that devaluate what Kaz has said? Please elaborate.
Job control does not require an interactive shell or a terminal
session. It can be used in scripting. That's the facts.
or if you know of any useful and sensible application contexts
for non-interactive usages I'd certainly be curious to know.[*]
I'm curious myself. That said, here's something I stumbled across
recently:
background job &
...
kill %1 # clean up
What happens if the background job has already terminated on its
own accord before we reach the kill(1)? Not much, because with job
control, the shell knows that no such job exists. If you do this
with "kill $!", you signal that PID, which no longer refers to the
intended process and may in fact have been reused for a different
process.
Les messages affichés proviennent d'usenet.