[BusyBox] Lash and uClinux
Fabrice Gautier
Fabrice_Gautier at sdesigns.com
Mon Dec 10 13:54:02 UTC 2001
Hi,
I'm using (trying to use) lash as my shell on a uClinux target.
It doesn't work and i'm suspicious of this code being part of the problem:
it's in the run_command function (lash.c:1350)
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (!(child->pid = fork()))
#else
if (!(child->pid = vfork()))
#endif
{
/* Set the handling for job control signals back to
the default. */
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
signal(SIGTSTP, SIG_DFL);
signal(SIGTTIN, SIG_DFL);
signal(SIGTTOU, SIG_DFL);
signal(SIGCHLD, SIG_DFL);
close_all();
The problem is that, in uClinux, we use vfork and then in close_all we reset
the close_me_head variable used for the mark_open/mark_closed function. So
in the end when mark_closed is called it detect a corrupted close_me_head.
And fails.
What's the point of the close_all here? Even when fork is used how is it
usefull ?
And also, has anybody used lash on uClinux? Is it safe ? If not which shell
is "vfork-safe" ?
Thanks.
--
Fabrice Gautier,
Fabrice_Gautier at sdesigns.com
--
Fabrice Gautier
Software Engineer, Sigma Designs
Fabrice_Gautier at sdesigns.com
More information about the busybox
mailing list