[gnu.bash.bug] job control bug

naim@EECS.NWU.EDU (Naim Abdullah) (07/25/89)

I have noticed a bug in bash 1.01, where bash loses track of
jobs and one cannot use fg with no arguments, to bring them to
the foreground.

I do not know whether this bug is present in 1.02 since we have
decided to wait till 1.03 (the reports of the core dump on ^D
in 1.02 scared us off 1.02 :-)).

		      Naim Abdullah
		      Dept. of EECS,
		      Northwestern University

		      Internet: naim@eecs.nwu.edu
		      Uucp: {oddjob, chinet, att}!nucsrl!naim
=============================Cut here for bug typescript=================
% echo $BASH_VERSION
1.01
% sleep 1000 &
[1] 29525
% sleep 2000 &
[2] 10522
% jobs
[1]   Running             sleep 1000  &
[2]+  Running             sleep 2000  &
% fg %1
sleep 1000 
^Z                        <------------user types a ^Z
[1]+  Stopped             sleep 1000 
% jobs
[1]+  Stopped             sleep 1000 
[2]-  Running             sleep 2000  &
% kill %1

[1]+  Stopped             sleep 1000 
% jobs
[1]+  Terminated          sleep 1000 
[2]-  Running             sleep 2000  &
[1]+  Terminated          sleep 1000 
% fg
No such job               <------------ doesn't find %2
% jobs
[2]-  Running             sleep 2000  & <-- it is there
% fg
No such job               <------------ but is not found!
%