My os has no fork/exec - can I use busybox?

Mike Frysinger vapier at gentoo.org
Fri Nov 6 23:13:40 UTC 2009


On Friday 06 November 2009 19:04:02 Denys Vlasenko wrote:
> On Thursday 05 November 2009 23:19, busby1 at llnl.gov wrote:
> > I'm writing user-level code on a high performance computer (IBM Blue
> > Gene).  The OS is missing some system calls, including fork/exec.
> 
> Without fork, you only lose ash applet.
> 
> But without exec, stock busybox is nearly useless.
> 
> The biggest problem is not that exec is not available
> (a fair number of applets don't need exec - like cp),
> but the fact that in many cases bbox is happily
> aborts on errors and/or doesn't bother to clean up
> allocated memory, open files etc,
> knowing that returning from main() will exit and
> kernel will do it anyway.
> 
> If you simply call <applet>_main(), it may exit on error
> or leak resources - this is not what you want.
> 
> The only applets which are safe to use in this case are
> NOFORK applets:

does NOFORK cover just the exit, or both exit and resource clean up ?  i'm 
wondering if we can reuse the NOFORK markings in the shell so we dont have to 
recreate builtins for each one.  someone on the uClinux mailing list pointed 
out that every avoided exec on an XIP system is a huge savings.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20091106/eeeab985/attachment.pgp>


More information about the busybox mailing list