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

Liste des GroupesRevenir à cu shell 
Sujet : When/why does the shell (bash) (sometimes) not re-cycle job IDs?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shell
Date : 11. May 2024, 21:47:25
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <v1oi0d$rrf5$3@news.xmission.com>
User-Agent : trn 4.0-test77 (Sep 1, 2010)
I recently experienced the following situation.  I have 3 background jobs,
all interactive shells, nicely arranged as job #1, job #2, and job #3.

When I do the "j" command ("j" is aliased to "jobs -l"), I get something
like:

[1]+ <number> Running         ssh somesystem &
[2]  <number> Running         ssh someOthersystem &
[3]  <number> Running         sudo bash &

Now, I did %1 and (accidentally) logged out of somesystem.  Now, when I do
"j", I get:

[2]  <number> Running         ssh someOthersystem &
[3]  <number> Running         sudo bash &

So, I ssh back into somesystem and do the usual ~^Z and find that it is now
job #4.  I want it to be job #1, like it was before.

Now, usually, when something like this happens, it is because some file or
some other resource is still open on the old object, so it cannot be
recycled.  But this doesn't seem to be the case here.  I tried it a few
times, but could not get back the #1 slot.

Eventually, I exited jobs 2 & 3, and then re-launched ssh somesystem and it
came out as job #1, after which I was able to re-construct jobs 2 & 3 and
then things were as they should be.  But should this hack be necessary?

--
In American politics, there are two things you just don't f*ck with:

    1) Goldman Sachs
    2) The military/industrial complex

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