The idea of "build libbusybox" was that you could write an app that would be able to - call foo_main - call libbb/ provided funcs Note applets calling fflush_stdout_and_exit() that would consistently return() instead though -- with a size penalty, unfortunately.
Longterm I'd prefer a PIE that would call main() for I think that's cleaner than linking a small busybox binary against the big libbusybox, just as a sidenote. As Dan said, if you have vfork then you're basically gold. HTH, On Nov 5, 2009 11:54 PM, "Dan Fandrich" <[email protected]> wrote: On Thu, Nov 05, 2009 at 02:19:10PM -0800, [email protected] wrote: > I'm writing user-level code on a ... Busybox will use vfork() if you have that. Or, you could marshall the arguments for each call and call the applet directly, e.g. ls_main() to do a directory. Or, more generically, rename busybox's main() to something else and call that in the same way for any applet, or write an execl()-style wrapper around it to make it easier to marshall the arguments from within a program. The TODO list shows a few potential gotchas with this approach, though. Pipes of course wouldn't work, and because the applets aren't reentrant, it won't be trivital to work around. Also, some applets aren't very good about cleaning up memory, relying on exit() to do it for them, which won't be available in your case. >>> Dan -- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved _______________________________________________ busybox mailing list [email protected] http://list...
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
