Bug 487 - [bash] job control doesn't work: e.g., fg/bg of bash not available
Summary: [bash] job control doesn't work: e.g., fg/bg of bash not available
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: High major
Target Milestone: 1.2
Assignee: Dexuan Cui
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-10-19 01:51 UTC by Qing He
Modified: 2011-11-04 10:09 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Qing He 2010-10-19 01:51:57 UTC
The fb/bg subcommand cannot run in bash, this also fails bash testsuite

reproduce step:
  $ bash
  $ fg
  bash: fg: command not found


expected result: "no current job"
Comment 1 Qing He 2010-10-20 01:52:11 UTC
job control can't be detected when cross-compiling, can be enabled explicitly by "--enable-job-control"
Comment 3 Dexuan Cui 2011-10-31 23:09:50 UTC
(In reply to comment #1)
> job control can't be detected when cross-compiling, can be enabled explicitly
> by "--enable-job-control"

Actually this doesn't work.  --enable-job-control is only a hint of wanting job control to work -- it can't 100% make sure the feature is properly enabled.

The config script actually reports:

configure:29262: checking for presence of necessary job control definitions
configure:29268: WARNING: cannot check job control if cross-compiling -- defaulting to missing
configure:29362: result: missing


According to the discussions at 
http://www.mail-archive.com/bug-bash@gnu.org/msg03107.html,
looks "export bash_cv_job_control_missing=present" would work.
Comment 4 Dexuan Cui 2011-10-31 23:13:32 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > job control can't be detected when cross-compiling, can be enabled explicitly
> > by "--enable-job-control"
> 
> Actually this doesn't work.  --enable-job-control is only a hint of wanting job
> control to work -- it can't 100% make sure the feature is properly enabled.
BTW, busybox's sh does support job control properly.
In core-image-minimal, busybox's sh is used by default, so people might think the bug has been fixed...
In core-image-sato, the bash from the recipe bash is used and we can reproduce this bug.
Comment 5 Dexuan Cui 2011-11-01 01:09:42 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > job control can't be detected when cross-compiling, can be enabled explicitly
> > by "--enable-job-control"
> 
> Actually this doesn't work.  --enable-job-control is only a hint of wanting job
> control to work -- it can't 100% make sure the feature is properly enabled.
> 
> The config script actually reports:
> 
> configure:29262: checking for presence of necessary job control definitions
> configure:29268: WARNING: cannot check job control if cross-compiling --
> defaulting to missing
> configure:29362: result: missing
> 
> 
> According to the discussions at 
> http://www.mail-archive.com/bug-bash@gnu.org/msg03107.html,
> looks "export bash_cv_job_control_missing=present" would work.


BTW, I worked out a fix and sent to oe-core ML:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=dcui/bug487&id=ac7b821f266e932e267a4d62af83586ba3261a98.