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
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox