ash ignors somtimes commands

Miroslaw Dach miroslaw.dach at psi.ch
Fri Jul 6 10:45:35 UTC 2007


Hi All,

	My observation is that the symptom I described before happens let 
say once per 200 times.

Maybe it is somehow related to the terminal under windows which I 
currently use.

Best Regards

Mirek

On Thu, 5 Jul 2007, Denis Vlasenko wrote:

> On Thursday 05 July 2007 09:48, Miroslaw Dach wrote:
> > 	I use busybox based root-file system on my PPC405 processor 
> > embedded system. My root file system is mounted via NFS. I have chosen ash 
> > as a shell.
> > 
> > ash works fine but from time to time it ignores commands which I type.
> > 
> > For example in most cases when I type 'ps' I get a complete list of
> > processes. Sometimes 'ps' does not print any thing.  It is the same with
> > all other commands. I have written 'all' because I have also my own 
> > programs which seem to be not execute (sometimes) when I type their names 
> > and press ENTER.
> > 
> > Does anybody have an idea why it is so?
> 
> Absolutely no idea. It's rather weird.
> 
> Can you give more details - how often commands do not execute?
> Every 2nd? Every tenth? Every 1000th?
> 
> Can you add debugging outputs in ash.c in cmdloop function, like 
> bb_error_msg("I am before parsecmd()"); bb_error_msg("I am after parsecmd()"); 
> bb_error_msg("I am before evaltree()"); etc, and get more info about
> this weird behavior?
> 
> static int
> cmdloop(int top)
> {
>         union node *n;
>         struct stackmark smark;
>         int inter;
>         int numeof = 0;
> 
>         TRACE(("cmdloop(%d) called\n", top));
>         for (;;) {
>                 int skip;
> 
>                 setstackmark(&smark);
> #if JOBS
>                 if (jobctl)
>                         showjobs(stderr, SHOW_CHANGED);
> #endif
>                 inter = 0;
>                 if (iflag && top) {
>                         inter++;
> #if ENABLE_ASH_MAIL
>                         chkmail();
> #endif
>                 }
>                 n = parsecmd(inter);
>                 /* showtree(n); DEBUG */
>                 if (n == NEOF) {
>                         if (!top || numeof >= 50)
>                                 break;
>                         if (!stoppedjobs()) {
>                                 if (!Iflag)
>                                         break;
>                                 out2str("\nUse \"exit\" to leave shell.\n");
>                         }
>                         numeof++;
>                 } else if (nflag == 0) {
>                         job_warning = (job_warning == 2) ? 1 : 0;
>                         numeof = 0;
>                         evaltree(n, 0);
>                 }
>                 popstackmark(&smark);
>                 skip = evalskip;
> 
>                 if (skip) {
>                         evalskip = 0;
>                         return skip & SKIPEVAL;
>                 }
>         }
>         return 0;
> }
> 
> --
> vda
> 

-- 
=============================================================================
          Miroslaw Dach (Miroslaw.Dach at psi.ch) - SLS/Controls Group 
                PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================




More information about the busybox mailing list