Bug 7310 - shell job count cannot be reached for the last jobs.
Summary: shell job count cannot be reached for the last jobs.
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 15:15 UTC by frank chen
Modified: 2014-09-08 15:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!