aboutsummaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply post-1.18.2 fixes, bump version to 1.18.31_18_3Denys Vlasenko2011-02-081-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use xfork() and xvfork()Pascal Bellard2010-07-041-15/+1
| | | | | | | | | | | | | | | | function old new delta launch_helper 170 169 -1 setup_heredoc 312 302 -10 handle_dir_common 367 354 -13 expand_vars_to_list 2456 2443 -13 open_transformer 89 74 -15 data_extract_to_command 439 423 -16 do_ipaddr 1406 1389 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use BB_EXECVP_or_die()Pascal Bellard2010-07-041-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta BB_EXECVP_or_die - 47 +47 time_main 1042 1043 +1 chrt_main 371 364 -7 ionice_main 292 282 -10 setsid_main 69 56 -13 nohup_main 236 223 -13 cttyhack_main 266 253 -13 chroot_main 94 81 -13 chpst_main 746 733 -13 timeout_main 297 279 -18 taskset_main 541 522 -19 vfork_child 67 45 -22 parse 975 953 -22 lpd_main 770 748 -22 launch_helper 192 170 -22 tcpudpsvd_main 1810 1782 -28 nice_main 190 156 -34 env_main 242 206 -36 run_command 221 174 -47 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352) Total: -304 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make exec failure message more consistentDenys Vlasenko2010-06-251-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko2010-03-181-1/+1
| | | | | | | | | | | | | | function old new delta parse 964 967 +3 udhcp_run_script 670 665 -5 singlemount 911 906 -5 mount_it_now 360 355 -5 inotifyd_main 521 516 -5 xspawn 21 - -21 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use ffulsh_all()Denys Vlasenko2009-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: revert the change where spawn reports exec failureDenys Vlasenko2009-10-111-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make spawn() print "can't execute '%s'" on execv errorDenys Vlasenko2009-10-081-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more portability fixes by Dan FandrichDenys Vlasenko2009-09-231-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stop using non-standard macro, use WEXITSTATUS insteadDenys Vlasenko2009-06-071-2/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Compatibility fixes:Denis Vlasenko2009-03-201-10/+9
| | | | | | | | | grep: support -z find: support --mindepth together +45 bytes cpio: support -p (configurable, +230 bytes) libbb: tweaks for cpio
* runsvdir: alternative methon of supporting runsvdir-as-init. +66 bytes.Denis Vlasenko2008-11-061-4/+4
| | | | | *: s/int/pid_t where appropriate
* ash: fix a bug in standalone mode (corrupted getopt() state)Denis Vlasenko2008-10-201-2/+34
|
* mdev: do not follow symlinks in /sys (as was intended prior to rev 18811).Denis Vlasenko2008-07-061-1/+8
| | | | | | | | | | | | | If this breaks things, please document why! mdev,init: use shared code for fd sanitization function old new delta bb_daemonize_or_rexec 155 172 +17 mdev_main 500 505 +5 init_main 907 856 -51 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 22/-51) Total: -29 bytes
* revert last two commits. vfork cannot be used in subroutine,Denis Vlasenko2008-07-011-2/+6
| | | | | it trashes stack on return
* *: introduce and use xfork()Denis Vlasenko2008-07-011-3/+1
| | | | | | | | | | | | | function old new delta xfork - 20 +20 msh_main 1377 1380 +3 mod_process 455 446 -9 forkexit_or_rexec 30 17 -13 expand_variables 1434 1421 -13 open_transformer 91 76 -15 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/4 up/down: 23/-50) Total: -27 bytes
* *: introduce and use xvfork()Denis Vlasenko2008-07-011-3/+1
| | | | | | | | | | | | | | | | | | | | function old new delta time_main 1052 1285 +233 crontab_main 623 856 +233 ifupdown_main 2202 2403 +201 xvfork - 20 +20 passwd_main 1049 1053 +4 grave 1068 1066 -2 script_main 935 921 -14 vfork_or_die 20 - -20 vfork_compressor 206 175 -31 open_as_user 109 - -109 popen2 218 - -218 edit_file 910 690 -220 run_command 268 - -268 ------------------------------------------------------------------------------ (add/remove: 1/4 grow/shrink: 4/4 up/down: 691/-882) Total: -191 bytes
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-15/+15
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* - use EXIT_{SUCCESS,FAILURE}. No object-code changesBernhard Reutner-Fischer2008-05-191-2/+2
|
* fix english in commentDenis Vlasenko2008-04-131-3/+3
|
* ash: speed up NOFORK code in ash by eliminating second find_applet().Denis Vlasenko2008-04-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | some code reduction along the way. function old new delta run_list 1971 1981 +10 run_nofork_applet_prime 181 182 +1 unsetcmd 97 96 -1 delete_cmd_entry 54 53 -1 describe_command 399 397 -2 cmdlookup 152 150 -2 evaltreenr 602 599 -3 evaltree 602 599 -3 clearcmdentry 101 98 -3 cdcmd 675 672 -3 hashcmd 305 301 -4 find_command 933 910 -23 evalcommand 1371 1229 -142 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/11 up/down: 11/-187) Total: -176 bytes
* libbb: introduce and use xrename and rename_or_warn.Denis Vlasenko2008-02-171-5/+0
|
* *: move getopt reset code to better place(s)Denis Vlasenko2008-01-281-20/+0
|
* tentatively fix getopt state corruption for NOFORK appletsDenis Vlasenko2008-01-271-2/+24
|
* libbb: introduce and use safe_waitpid (loops in EINTR)Denis Vlasenko2008-01-021-16/+21
| | | | | | | | | | | | | | | | | | | | | | *: use more approproate (shorter) versions of wait() function old new delta safe_waitpid - 48 +48 wait_any_nohang - 17 +17 send_tree 365 369 +4 processorstop 432 435 +3 text_yank 110 108 -2 make_human_readable_str 202 200 -2 crond_main 1368 1366 -2 handle_sigchld 49 43 -6 reapchild 166 159 -7 custom 260 250 -10 checkscript 191 177 -14 wait_nohang 17 - -17 wait_pid 43 - -43 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103) Total: -31 bytes
* Further optimize applet tables; prettify build outputDenis Vlasenko2007-11-291-1/+1
| | | | | | | text data bss dec hex filename 775923 929 9100 785952 bfe20 busybox_old 775565 929 9100 785594 bfcba busybox_unstripped
* reorganize applet table. Eliminates pointers to names.Denis Vlasenko2007-11-281-11/+11
| | | | | | | | | Should be a big win for libbusybox. busybox wins too: text data bss dec hex filename 776524 929 9100 786553 c0079 busybox_old 775903 929 9100 785932 bfe0c busybox_unstripped
* get rid of global "struct bb_applet *current_applet"Denis Vlasenko2007-10-101-7/+3
|
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-1/+1
| | | | | 263 bytes saved.
* make standalone httpd work on NOMMU machinesDenis Vlasenko2007-08-181-5/+10
|
* start_stop_daemon: NOMMU fix; smaller fixesDenis Vlasenko2007-07-311-2/+2
|
* init: make sure fd 0,1,2 are not closed, + related optimizations.Denis Vlasenko2007-06-141-6/+6
| | | | | | init_main 929 920 -9 bb_daemonize_or_rexec 145 127 -18
* make busybox --install work even if /proc/self/exe doesn't existDenis Vlasenko2007-06-081-2/+2
| | | | | | | | # size busybox_old busybox_unstripped text data bss dec hex filename 680095 2704 15648 698447 aa84f busybox_old 680099 2704 15648 698451 aa853 busybox_unstripped
* hush: fix handling of unmatched ${name (without closing '}') -Denis Vlasenko2007-05-241-1/+4
| | | | | | | was eating all remaining input, potentially megabytes. nofork: save/restore die_jmp too nofork: use -2222 instead of -111 as "special" return valur for zero (-111 is used by some applets. -2222 won't fit in exitcode and thus safer)
* more compile fixes from randomconfig runDenis Vlasenko2007-05-171-0/+2
|
* hush: fix nofork + ctrl-Z clobbering of globalsDenis Vlasenko2007-04-281-12/+29
|
* hush: use NOFORK applets as appropriate. Net reduction of code size.Denis Vlasenko2007-04-141-41/+48
|
* pass a copy of argv[i] to NOFORK applets (they may permute it etc).Denis Vlasenko2007-04-121-14/+18
| | | | set/save/restore more shared global variables whan call one applet from another
* fix misplaced #ifDenis Vlasenko2007-04-111-1/+1
|
* add more convenient defines for [NO]MMU:Denis Vlasenko2007-04-111-15/+10
| | | | "#ifndef BB_NOMMU" is a double negative
* random NOMMU fixes. compressed --help really does work for NOMMU! /me happyDenis Vlasenko2007-04-101-0/+3
|
* Rename two config options:Denis Vlasenko2007-04-101-4/+10
| | | | | | | FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS Make SH_STANDALONE depend on PREFER_APPLETS. getopt.c: more randomconfig-induced fixes
* make compressed help code NOMMU- and NOFORK-friendly -Denis Vlasenko2007-04-101-98/+46
| | | | no forking anymore, bunzip2 unpack routine now does all it in memory.
* make a few struct bb_applet members conditionalDenis Vlasenko2007-04-101-5/+18
| | | | | | rename sllep_and_die -> xfunc_die make fflush_stdout_and_exit NOFORK-safe fix some buglets found by randomconfig
* make xfunctions optionally longjump instead of exit.Denis Vlasenko2007-04-091-4/+21
| | | | | use it for making NOFORK more practical. touch: make it a NOFORK applet
* factor out NOFORK/NOEXEC code from find. Use it for xargs too.Denis Vlasenko2007-04-091-3/+39
|
* wait4pid: if passed with pid < 0, do not set errno - it is already set by exec!Denis Vlasenko2007-04-091-1/+33
|
* Implement first instance of NOFORK applet - echoDenis Vlasenko2007-04-091-3/+5
| | | | | | | | | find: use NOFORK/NOEXEC; small -exec buglet also eliminated vfork_daemon_rexec: honor PREFER_APPLETS echo: small size improvements find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
* zcip: make it work on NOMMU (+ improve NOMMU support machinery)Denis Vlasenko2007-03-261-3/+6
| | | | fsck: fix bad English in a comment