Pondering NOFORK annotation...

Rob Landley rob at landley.net
Mon Jul 24 10:08:43 PDT 2006


On Monday 24 July 2006 11:25 am, Shaun Jackman wrote:
> On 7/24/06, Rob Landley <rob at landley.net> wrote:
> ...
> > Lemme finish converting converting the repository, rewriting mke2fs, and
> > redoing getopt_ulflags(), and then I'll tackle bbsh and make standalone.
> 
> While you're redoing getopt_ulflags, can you get get rid of
> bb_opt_complementally as a global? An argument to getopt_ulflags would
> be in better taste.

Already done. :)

I'm actually trying to change the syntax so we can specify this stuff inline.  
We've already extended the standard getopt syntax a bit, and I'm thinking 
that there are a bunch of characters the shell tries not to let through to 
apps anyway because they have special meanings ( * ? | & " ' ~ > < ! # - ) 
and as such they make _sucky_ choices for options.  (And in fact - _can't_ be 
a command option because -- already has a special meaning...)

So I'm using them for in-band signaling of funky behavior so we don't need an 
external complementally.  Still working out the exact syntax...

Another thing I'm trying to figure out is whether longopts should be the first 
vararg (with a special character at the start of the getopt string that says 
your first vararg is longopts) or whether I should just signal them in-band 
(which is easy enough syntax-wise, something like "a-arugula-" for --arugula 
being a synonym for -a) but a pain to #ifdef out because you need a USE() for 
every longopt...  But either way, they really shouldn't be an ugly magic 
global.

> > P.S.  At OLS, I got armulator to work.  I have a nommu test environment 
now!
> > Woot!
> 
> Sweet! I've wanted to test-drive armulator, but not got around to it.

I emailed the upstream maintainer of this page with some fixes:
http://www.uclinux.org/pub/uClinux/utilities/armulator/

And in hopes he'll reorganize it a bit.  (He was sitting next to me at the 
table at OLS, so I suspect he's going to.  He's probably still travelling, 
though...)

Basically, you download the ancient gdb tarball they have, apply the armulator 
patch to it, fix this to build with gcc 4.x (whitespace damaged cut-and-paste 
patch but it's a simple fix):

--- gdb-5.0/include/obstack.h   2000-02-22 11:18:13.000000000 -0500
+++ gdb-woot/include/obstack.h  2006-07-22 10:48:51.000000000 -0400
@@ -421,7 +421,9 @@
 ({ struct obstack *__o = (OBSTACK);                                    \
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)            \
      _obstack_newchunk (__o, sizeof (void *));                         \
-   *((void **)__o->next_free)++ = ((void *)datum);                     \
+   *((void **)__o->next_free) = ((void *)datum);                       \
+                                                                       \
+   __o->next_free++;                                                   \
    (void) 0; })

 # define obstack_int_grow(OBSTACK,datum)                               \

Then build and run like the page tells you to.  They should have 2.6 images up 
eventually, since they have them more or less working already...

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list