Sujet : Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shellDate : 12. May 2024, 01:14:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v1p1kf$2ake7$1@dont-email.me>
References : 1 2
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Sat, 11 May 2024 22:44:03 -0000 (UTC), Christian Weisgerber wrote:
If no job is running, a new job gets 1, otherwise new jobs are numbered
consecutively.
Job numbers are reused after it has notified you of termination of the
previous job. At least in Bash.
I’ve often wondered why shells don’t use poll/select-based event loops.
Then they can notify you of job termination immediately, instead of
waiting for you to press return.
I offer no opinion on this, nor on the Plan 9 assertion that job control
is a poor hack and you should just open another window.
I use job control, I use both tabs and windows in my favourite terminal
emulator (Konsole), and I use screen when SSH’ing to a client’s remote
test server. I have a bunch of containers running on the latter to try out
various things, and each one has its own session within screen.