aboutsummaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * hush: document buggy handling of duplicate "local"Denys Vlasenko2015-04-182-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix handling of duplicate "local"Denys Vlasenko2015-04-184-17/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: skip poll in read built-inRon Yorston2015-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | GNUlib poll doesn't seem to work when the file descriptor refers to a file on disk. This may not be surprising given the warning in the Windows API documentation against using disk file handles in calls to WaitForSingleObject. Skipping poll in the read built-in allows file redirection to work and doesn't make interrupt handling any worse than it was before.
* | Merge branch 'busybox' into mergeRon Yorston2015-03-231-3/+0
|\|
| * ash: do not split the result of tilde expansionRon Yorston2015-03-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A tilde expansion generates a valid pathname. Splitting it using IFS either leaves it unchanged or changes it to something unintended. Example: IFS=m HOME=/tmp; printf "%s\n" ~ Based on this commit authored by Jilles Tjoelker: http://git.kernel.org/cgit/utils/dash/dash.git/commit/?id=834629283f6c629a4da05ef60bae9445c954a19a Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-03-144-14/+25
|\| | | | | | | | | | | Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
| * libbb: introduce and use is_prefixed_with()Denys Vlasenko2015-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix a SEGV case in an invalid heredocDenys Vlasenko2015-02-053-4/+15
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix a SEGV in ${#1}Denys Vlasenko2014-12-291-9/+9
| | | | | | | | | | | | | | | | function old new delta varvalue 760 805 +45 evalvar 648 603 -45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-12-142-5/+32
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * typo fix in commentDenys Vlasenko2014-11-201-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: do not segfault on $((2**63 / -1))Denys Vlasenko2014-11-181-4/+23
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix handling of negative start value in ${v:start:len}Denys Vlasenko2014-11-171-1/+9
| | | | | | | | | | | | | | function old new delta subevalvar 1140 1168 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-10-064-33/+81
|\|
| * ash: fix off-by-one in "jobs %4" handling. closes 7310Denys Vlasenko2014-09-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: factor out ASH_HELP config optionDenys Vlasenko2014-09-081-11/+15
| | | | | | | | | | | | | | | | | | It used to be aliased to !FEATURE_SH_EXTRA_QUIET for ash, while hush had it separate from FEATURE_SH_EXTRA_QUIET. Bring ash in line with hush. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: make ${#var} unicode-awareDenys Vlasenko2014-08-131-13/+26
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: run reinit_unicode() only if makes senseDenys Vlasenko2014-08-132-5/+11
| | | | | | | | | | | | With static Unicode support, no need to check $LANG et al. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: make ${#var} unicode-awareDenys Vlasenko2014-08-133-10/+35
| | | | | | | | | | | | This mimics bash Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-06-301-1/+1
|\|
| * libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytesBartosz Golaszewski2014-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_sc_clk_tck - 10 +10 timescmd 118 113 -5 print_route 1763 1758 -5 mpstat_main 1288 1283 -5 iostat_main 1947 1942 -5 INET_setroute 879 871 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: support UNC paths in cd commandRon Yorston2014-05-211-13/+20
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-05-066-19/+177
|\| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * ash,hush: set $HOSTNAME is bash compat. Closes 7028Denys Vlasenko2014-04-152-1/+16
| | | | | | | | | | | | | | | | function old new delta hush_main 1056 1128 +72 ash_main 1442 1487 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: make "locak VAR" unset VAR (bash does that)Denys Vlasenko2014-03-163-0/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: fix a thinko about 2^64-1 factorizationDenys Vlasenko2014-03-151-5/+11
| | | | | | | | | | | | | | function old new delta next_random 113 119 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: make "true" built-inDenys Vlasenko2014-03-141-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * random: cosmetic tweaks in debug codeDenys Vlasenko2014-03-131-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: improve randomness of $RANDOM, add easy-ish way to test itDenys Vlasenko2014-03-132-17/+135
| | | | | | | | | | | | | | | | function old new delta next_random 68 113 +45 change_random 103 121 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: remove redundant commentRon Yorston2014-05-011-1/+0
| |
* | ash: further tidying up of MinGW forkshellRon Yorston2014-04-301-41/+47
| | | | | | | | | | | | | | The forkpoint_fn in the forkshell structure was redundant as the fpid element indicated which function to call in the child. Explicitly set fpid before calling spawn_forkshell and replace the forkpoint_fn array with a function, forkshell_child.
* | ash: tidy up MinGW forkshellRon Yorston2014-04-291-120/+129
| | | | | | | | | | | | | | Move some MinGW-specific code into sections at the top and bottom of the file. Exclude some code that isn't used in the MinGW port.
* | ash: reset $RANDOM in subshellRon Yorston2014-04-281-0/+2
| |
* | Remove unnecessary differences from upstream BusyBoxRon Yorston2014-03-231-1/+0
| |
* | shell_common: exclude more unused ulimit codeRon Yorston2014-03-231-7/+6
| |
* | ash: set fake PPID valueRon Yorston2014-03-201-3/+2
| |
* | mingw: dummy implementation of times/sysconfRon Yorston2014-01-301-9/+0
| |
* | ash: reset pointers to builtin environment variables after forkRon Yorston2014-01-141-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The builtin environment variables can be accessed using macros that reference the varinit array. initvar puts pointers to varinit into the variable hash table. During forkshell_prepare two copies of the builtin variables are made: once as the varinit array and again through the pointers in the hash table. One of these copies is accessed by code that uses the macros and the other by code that looks up the variable by name. This is the cause of the strange behaviour of IFS in backticks: https://github.com/pclouds/busybox-w32/issues/12 To avoid the problem the pointers in the hash table are reset to the varinit array in forkshell_init. It seemed easier to do it this way than to try and prevent the duplicate copies being made in the first place.
* | ash: revert initialisation of SHLVL: fixed upstreamRon Yorston2014-01-131-4/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-131-1/+1
|\| | | | | | | | | | | Conflicts: include/platform.h scripts/basic/fixdep.c
| * ash: in bash compat mode, always export $SHLVLDenys Vlasenko2014-01-071-1/+1
| | | | | | | | | | | | | | function old new delta ash_main 1437 1442 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: don't copy localvars list during forkshellRon Yorston2014-01-131-23/+2
| | | | | | | | | | | | The localvars linked list is only required to tidy up local variables when a shell function returns. There's no point in copying it to a child process.
* | shell: add \r to IFSRon Yorston2014-01-121-0/+4
| | | | | | | | | | | | When commands run in backquotes generated multiple lines of output the carriage returns weren't being removed. Adding \r to IFS fixes this.
* | ash: prevent null-pointer exception with local variablesRon Yorston2014-01-101-1/+1
| | | | | | | | | | | | A local variable can have a null text pointer: if so, don't call strlen. localvar_copy handles this correctly because nodeckstrdup doesn't try to copy from the null pointer.
* | ash: drop unnecessary change from upstream BusyBoxRon Yorston2014-01-081-2/+0
| |
* | Make dummy resource.hRon Yorston2014-01-061-2/+0
| |
* | Make dummy paths.hRon Yorston2014-01-051-2/+0
| |
* | Initialise SHLVL when shell is first startedRon Yorston2014-01-021-0/+4
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-022-10/+12
|\| | | | | | | | | | | Conflicts: archival/Config.src shell/ash.c
| * hush: typo fixes in commentsDenys Vlasenko2013-11-281-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>