Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/docs/nofork_noexec.txt

    r1765 r2725  
    33Unix shells traditionally execute some commands internally in the attempt
    44to dramatically speed up execution. It will be slow as hell if for every
    5 "echo blah" shell will fork and exec /bin/echo. For this end, shells
     5"echo blah" shell will fork and exec /bin/echo. To this end, shells
    66have to _reimplement_ these commands internally.
    77
     
    1212
    1313Applet will be subject to NOFORK/NOEXEC tricks if it is marked as such
    14 in applets.h. CONFIG_FEATURE_PREFER_APPLETS is a config option which
     14in applets.h. FEATURE_PREFER_APPLETS is a config option which
    1515globally enables usage of NOFORK/NOEXEC tricks.
     16If it is enabled, FEATURE_SH_STANDALONE can be enabled too,
     17and then shells will use NOFORK/NOEXEC tricks for ordinary commands.
     18NB: shell builtins use these tricks regardless of FEATURE_SH_STANDALONE
     19or FEATURE_PREFER_APPLETS.
    1620
    17 If you want to call a program and wait for it, use spawn_and_wait(argv).
    18 It will check whether argv[0] is an applet name and will optionally
    19 do NOFORK/NOEXEC thing.
     21In C, if you want to call a program and wait for it, use
     22spawn_and_wait(argv), BB_EXECVP(prog,argv) or BB_EXECLP(prog,argv0,...).
     23They check whether program name is an applet name and optionally
     24do NOFORK/NOEXEC thing depending on configuration.
    2025
    21 NOEXEC
     26
     27    NOEXEC
    2228
    2329NOEXEC applet should work correctly if another applet forks and then
     
    3339
    3440NOEXEC applets save only one half of fork+exec overhead.
    35 NOEXEC trick is disabled for NOMMU compile.
     41NOEXEC trick is disabled for NOMMU build.
    3642
    37 NOFORK
     43
     44    NOFORK
    3845
    3946NOFORK applet should work correctly if another applet simply runs
     
    5663  allocation. All other allocations should use malloc[_or_warn]().
    5764  After first allocation, you cannot use any xfuncs.
     65  Otherwise, failing xfunc will return to caller applet
     66  without freeing malloced data!
    5867* All allocated data, opened files, signal handlers, termios settings,
    5968  O_NONBLOCK flags etc should be freed/closed/restored prior to return.
Note: See TracChangeset for help on using the changeset viewer.