Denys Vlasenko
438b4ac286
script: make it work even if fd 0 is closed
...
Testcase:
script -q -c "echo hey" /dev/null 0>&-
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 12:34:53 +01:00
Denys Vlasenko
66426760be
*: remove "Options:" string from help texts
...
function old new delta
packed_usage 28706 28623 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Pere Orga
5bc8c005a8
move remaining help text from include/usage.src.h
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
681efe20d3
use user's shell instead of hardwired "/bin/sh" (android needs this)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:00:36 +01:00
Denys Vlasenko
e4dcba1c10
*: whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
0ef64bdb40
*: make GNU licensing statement forms more regular
...
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>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
9768a82eb0
*: fix "see file License ..." - the file is named LICENSE (in uppercase)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:04:14 +02:00
Pascal Bellard
926031b764
*: introduce and use xfork() and xvfork()
...
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>
2010-07-04 15:32:38 +02:00
Denys Vlasenko
88aa558e5c
*: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERR
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02 15:02:45 +01:00
Denys Vlasenko
cb23d93c68
*: add/remove safe_, it seems we had a few incorrect uses
...
function old new delta
chat_main 1359 1361 +2
microcom_main 712 713 +1
ifplugd_main 1109 1110 +1
arpping 465 466 +1
acpid_main 440 441 +1
script_main 1069 1067 -2
cgi_io_loop_and_exit 594 591 -3
telnet_main 1475 1469 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11) Total: -5 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 12:29:55 +01:00
Denys Vlasenko
f3b92d3856
getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
...
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
2634bf366b
randomconfig fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09 18:40:07 +02:00
Denys Vlasenko
53f1791212
*: reduce #ifdef forest
...
Remove unnecessary #if statements from the "more", "script", and
"scriptreplay" commands. Bloatcheck says 0 bytes changed.
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 14:55:26 +02:00
Denys Vlasenko
5e61115ea4
scriptreplay: new applet. +423 bytes
...
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-19 17:36:16 +02:00
Denis Vlasenko
f09f4e015b
runsv: small optimization
...
*: more paranoia around passing NULL to execl[e]
function old new delta
custom 240 221 -19
2009-02-26 12:29:59 +00:00
Denis Vlasenko
3fa36e2350
*: a bit of code shrink
...
function old new delta
stop_handler 41 38 -3
sulogin_main 508 504 -4
got_cont 4 - -4
cont_handler 11 - -11
startservice 309 297 -12
processorstart 423 409 -14
tcpudpsvd_main 1861 1843 -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes
2008-11-09 00:15:11 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
82604e9730
revert last two commits. vfork cannot be used in subroutine,
...
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
3da5572bfa
*: introduce and use xvfork()
...
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
2008-07-01 10:40:41 +00:00
Bernhard Reutner-Fischer
5e25ddb7d3
- use STD*_FILENO some more. No object-code changes
2008-05-19 09:48:17 +00:00
Bernhard Reutner-Fischer
ae4342ca3e
- Rename getpty() to xgetpty() and adjust callers.
...
- Rewrite kbd_mode and setconsole
- Introduce and use console_make_active() and xopen_xwrite_close()
- honour buffer-reservation method as set by the user (dumpkmap, loadkmap)
- shrink rtcwake and some console-tools
Saves about 270 Bytes
2008-05-19 08:18:50 +00:00
Denis Vlasenko
06ebc16461
script: exit if reading from pseudo-tty errors out (do not loop)
...
function old new delta
script_main 991 966 -25
2008-05-06 19:11:41 +00:00
Denis Vlasenko
9dedf72e71
script: do not ignore poll() errors. ~+20 bytes.
2008-04-01 16:12:17 +00:00
Denis Vlasenko
42cc304e90
lpr: add more accurate comments
...
*: trailing whitespace removal
2008-03-24 02:05:58 +00:00
Denis Vlasenko
85c247161b
*: fix fallout from -Wunused-parameter
...
function old new delta
bbunpack 358 366 +8
passwd_main 1070 1072 +2
handle_incoming_and_exit 2651 2653 +2
getpty 88 86 -2
script_main 975 972 -3
inetd_main 2036 2033 -3
dname_enc 377 373 -4
make_new_session 474 462 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24) Total: -12 bytes
text data bss dec hex filename
797429 658 7428 805515 c4a8b busybox_old
797417 658 7428 805503 c4a7f busybox_unstripped
2008-03-17 09:04:04 +00:00
Denis Vlasenko
68404f13d4
*: add -Wunused-parameter; fix resulting breakage
...
function old new delta
procps_scan 1265 1298 +33
aliascmd 278 283 +5
parse_file_cmd 116 120 +4
dname_enc 373 377 +4
setcmd 90 93 +3
execcmd 57 60 +3
count_lines 72 74 +2
process_command_subs 340 339 -1
test_main 409 407 -2
mknod_main 179 177 -2
handle_incoming_and_exit 2653 2651 -2
argstr 1312 1310 -2
shiftcmd 131 128 -3
exitcmd 46 43 -3
dotcmd 297 294 -3
breakcmd 86 83 -3
evalpipe 353 349 -4
evalcommand 1180 1176 -4
evalcmd 109 105 -4
send_tree 374 369 -5
mkfifo_main 82 77 -5
evalsubshell 152 147 -5
typecmd 75 69 -6
letcmd 61 55 -6
add_cmd 1190 1183 -7
main 891 883 -8
ash_main 1415 1407 -8
parse_stream 1377 1367 -10
alloc_procps_scan 55 - -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes
text data bss dec hex filename
797195 658 7428 805281 c49a1 busybox_old
797101 658 7428 805187 c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko
32fd76c1d5
script: correctly handle buffered "tail" of output. +35 bytes.
2008-02-28 10:10:10 +00:00
Denis Vlasenko
574f2f4394
*: add optimization barrier to all "G trick" locations
2008-02-27 18:41:59 +00:00
Denis Vlasenko
5014dada3f
script: new applet by Pascal Bellard <pascal.bellard AT ads-lu.com>
2008-02-27 11:54:59 +00:00