[PATCH] Fix start-stop-daemon on no-MMU

Alex Landau landau_alex at yahoo.com
Tue Jul 24 09:54:12 UTC 2007


Hi,

The attached patch fixes a compilation error:
   undefined reference to `_BUG_bb_daemonize_is_unavailable_on_nommu
and makes start-stop-daemon usable on no-MMU by using bb_daemonize only if BB_MMU and
emulating it if !BB_MMU.

This is a bit hackish, since after vfork(), the child does all the work and exec()s the
daemon, rather than execing right away, as the vfork paradigma says. Still I think this
is better than re-execing start-stop-daemon and only then execing the daemon itself since
this approach requires removing the -b (or --background) arguments from the command line,
which is not fun (what if there are several -b options? etc.), and does not give any
visible benefits.

You may also find some code duplications with the fork_and_reexec functions (i.e. call to
setsid, dupping /dev/null to 0,1 and 2), but I think this is unavoidable since all of
these functions either do something slightly different or do not work on no-MMU.

Regards,
Alex


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: start-stop-daemon.patch
Type: text/x-patch
Size: 706 bytes
Desc: 1590918349-start-stop-daemon.patch
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070724/44d82925/attachment-0002.bin 


More information about the busybox mailing list