Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?

Liste des GroupesRevenir à cu shell 
Sujet : Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shell
Date : 12. May 2024, 03:38:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v1p6hr$2btq7$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 12.05.2024 02:14, Lawrence D'Oliveiro wrote:
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.

Also the same behavior in Ksh, ever since I can remember; lowest job
number "available" gets re-used first. (Where "available" means that
its finishing status has been reported and not that the job finished.)

 
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.

It may be considered undesired in an interactive shell to unnecessarily
spoil the output of other running processes. If job output would be
written asynchronously then you could also easily miss the output of
the job control system. Likely two undesired effects.

 
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'm using a lot shell windows, subshell instances, and also background
jobs. Each for different sets of use cases.

For me it's much faster to fire up a background job than opening a new
window. And a lot less overhead (typing, switching, timing, resources).

Sounds more like a "Use the hammer for this screw!" suggestion to me.

Janis

[...]



Date Sujet#  Auteur
11 May 24 * When/why does the shell (bash) (sometimes) not re-cycle job IDs?15Kenny McCormack
12 May 24 `* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?14Christian Weisgerber
12 May 24  +* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?12Lawrence D'Oliveiro
12 May 24  i+- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1vallor
12 May 24  i+* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?6Janis Papanagnou
12 May 24  ii+* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?4Kenny McCormack
12 May 24  iii`* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?3Janis Papanagnou
12 May 24  iii `* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?2Kenny McCormack
13 May 24  iii  `- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1Janis Papanagnou
12 May 24  ii`- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1Lawrence D'Oliveiro
12 May 24  i+- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1Kenny McCormack
12 May 24  i`* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?3Christian Weisgerber
12 May 24  i `* Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?2Lawrence D'Oliveiro
13 May 24  i  `- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1Christian Weisgerber
12 May 24  `- Re: When/why does the shell (bash) (sometimes) not re-cycle job IDs?1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal