Re^2: Problem piping "jobs"

Elmar Schuetz schuetz at iraul1.ira.uka.de
Fri Dec 16 18:27:17 AEST 1988


In article <1811 at solo9.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
>mikej at tfli.UUCP (Michael R.  Johnston) writes:
>\NOTE: Your last process does NOT necessarily have to be the highest numbered
>\process attached to your tty. In particular processes wrap around after
>\a certain point and start from the bottom again. 
>Elmar was talking about the highest JOB NUMBER, not process id:

Sorry Maarten, Michael is right. I think he is talking about job-numbers too.
Let's start as much 'sleep 999 &'s as possible ...  Anytime comes the message:
"No more processes." Let's kill the jobs [2] to [8] and do a 'jobs -l'.
The result:

[1]  +	1221 Stopped		rn -N
[8]	1609 Killed		sleep 999
[9]	1610 Running		sleep 999
[10]	1612 Running		sleep 999
...						[ [11] to [48] deleted ]
[49]	1652 Running		sleep 999
[50] -	1653 Running		sleep 999

Now let's start another three 'sleep 888 &'s. And see, their job-numbers are
[2], [3] and [4].

[1]  +	1221 Stopped		rn -N
[2]	1660 Running		sleep 888
[3]	1661 Running		sleep 888
[4]	1662 Running		sleep 888	[This *is* the latest job !!! ]
[9]	1610 Running		sleep 999
[10]	1612 Running		sleep 999
...						[ [11] to [48] deleted ]
[49]	1652 Running		sleep 999
[50] -	1653 Running		sleep 999

Well, [4] is not the highest number at all.
But normally this won't happen.

Cheers, Elmar
--
My VAX might think I'm crazy starting so many useless 'sleep's.



More information about the Comp.unix.questions mailing list