Bug 7310

Summary: shell job count cannot be reached for the last jobs.
Product: Busybox Reporter: frank chen <frank.chen2>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description frank chen 2014-08-11 15:15:25 UTC
create 4 jobs for suspend(new shell, only 4 jobs), use jobs command you can see the 4 jobs, but when you try to query on the last jobs(i.e jobs %4), it will have "no such job" error. The reason is getjob only looking for (num < njobs), njobs is the allocated jobs(in my case is 4).

The fix is use if (num <= njobs) in getjob for looking the last jobs.
Comment 1 Denys Vlasenko 2014-09-08 15:22:34 UTC
Fixed in git, thanks!