[BusyBox] [BUG] rc2, init and askfirst action

Rob Landley rob at landley.net
Sat Aug 7 03:21:20 UTC 2004


On Friday 06 August 2004 10:53, Jean Wolter wrote:
> Hello,
>
> init hangs and is not able to reape orphaned processes if somone uses
> an askfirst action in inittab.

I started on an init cleanup a couple months ago that turned into a major 
rewrite.  I have it mostly done, and could probably finish the rewrite in a 
weekend if anybody was interested in testing it out.  (Hint hint.)

It's been on hold partly because I've been insanely busy getting Linucon 
together, and partly because busybox went into feature freeze until 1.0 and 
this counts as a new feature.

As for askfirst: that feature should probably be dropped out in favor of 
making a dumb little askfirst executable that prints its hello message, waits 
for you to hit enter, and the execs argv1 and up from its command line.  
There's not much point putting this in init, it's maybe a 10 line C program.

> init uses vfork on systems without a mmu (and for some reasons on our
> system too because __ARCH_HAS_MMU__ is undefined). vfork() waits until
> the child process calls exit() or execve(). Unfortunatly the child
> waits for a key before executing execve(). Therefore init blocks and can't
> react to any event (not even reboot works)

Init's use of vfork is icky.  Deciding what to do about that is where my 
cleanup got put on hold, actually.

I'm currently thinking of making it a config option.  Menuconfig can say "make 
init use vfork", and then it can be a #define at the top of init.c, after 
which it's Not My Problem Anymore. :)

Rob
-- 
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas.  (I'm the con chair.)




More information about the busybox mailing list