fork() on NOMMU
Alex Landau
landau_alex at yahoo.com
Sun Sep 2 06:19:08 PDT 2007
--- Denys Vlasenko <vda.linux at googlemail.com> wrote:
> To ifdef out things that do not work on NOMMU (for example,
> mount's NFS-related option to auto-background should be disabled).
>
> You already did it for httpd by adding #ifdefs which basically
> enforced httpd -i. Send similar patches for tar/mount/whatever.
>
Attached patch does that for mount.
It ignores the options "fg" and "bg" (always doing "fg"). Do you think a message (+exit?)
should be printed if "bg" is passed? I never used bg myself, so don't know how useful it
is...
For tar it's trickier... I'm thinking of changing the prototype of open_transformer to
(int fd, func_ptr, decompressor_prog). the decompressor_prog is a string equal to "gzip
-cdf", "bzip2 -cdf" or something similar (maybe just "gzip, "bzip2", and open_transformer
itself would add "-cdf"). Then define a macro with the same name that on MMU will just
withdraw the last argument, and on NOMMU withdraw the func_ptr (similar to
daemonize_or_reexec). open_transformer itself will have an "#if BB_MMU" that will decide
to fork and use func_ptr or to vfork and exec decompressor_prog.
Sounds OK?
> Note that this is not a best solution. More like as
> a stopgap fix.
>
> For example, in 1.7.0 httpd goes further and actually
> does NOMMU specific things to retain ability to run
> in standalone mode: it vforks + re-exec itself as child.
I don't see the need for this in mount. Feel free to add if you wish...
Alex
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mount-nommu.diff
Type: text/x-patch
Size: 1007 bytes
Desc: 4006543762-mount-nommu.diff
Url : http://busybox.net/lists/busybox/attachments/20070902/5680e3b8/attachment.bin
More information about the busybox
mailing list