aboutsummaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-2238-0/+1158
| | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Work better with how make/bmake works:Marcel Moolenaar2012-05-242-9/+9
| | | | | | | | | | | | | | | 1. Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to. 2. Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to get sources from (= ${.CURDIR}). This to compensate for point 1. This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to expand to "." after changing cwd, not taking into account that the target is pretty much undoing that and not getting the full path to the object tree anymore. Notes: svn path=/head/; revision=235927
* Add 'cow' keyword to show per-process cow count.Konstantin Belousov2012-05-232-1/+4
| | | | | | | | Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week Notes: svn path=/head/; revision=235851
* Mention the upper hard limit for -n option. Patch slightly modifiedWarren Block2012-05-231-3/+6
| | | | | | | | | | | | from PR version. PR: 168255 Submitted by: Andy Kosela Approved by: gjb MFC after: 3 days Notes: svn path=/head/; revision=235842
* Remove redundant declaration of yyparseKevin Lo2012-05-221-1/+0
| | | | | | | Reported by: tinderbox Notes: svn path=/head/; revision=235771
* Add build opton MK_LS_COLORS to control whether ls(1) supports colorsMarcel Moolenaar2012-05-191-1/+4
| | | | | | | | | | (and thus needs to depend on libtermcap). Embedded systems may not want or need colors. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=235655
* Add build option MK_ED_CRYPTO to control whether ed(1) is to have theMarcel Moolenaar2012-05-191-3/+3
| | | | | | | | | | ability to encrypt/decrypt files. Embedded systems can typically have OpenSSL, but not for ed(1) to use it. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=235654
* Remove unused header (libutil.h)Marcel Moolenaar2012-05-171-1/+0
| | | | Notes: svn path=/head/; revision=235565
* sh: Remove an unused header.Jilles Tjoelker2012-05-151-1/+0
| | | | | | | The read builtin no longer does things with termios. Notes: svn path=/head/; revision=235488
* Minor mdoc nits.Joel Dahl2012-05-133-4/+4
| | | | Notes: svn path=/head/; revision=235400
* I forgot to bump the manpage date.Matthew D Fleming2012-05-121-1/+1
| | | | | | | | | Reminded by: Garrett Cooper MFC after: 3 days X-MFC-with: r235297 Notes: svn path=/head/; revision=235316
* Add a -v and -N option to kenv(1), so it can be more easily used inMatthew D Fleming2012-05-112-9/+35
| | | | | | | | | | | | | | scripts the way sysctl(8) is. The -N option, like in sysctl(8), displays only the kenv names, not their values. The -v option prints an individual kenv variable name with its value as name="value". This is the inverse of sysctl(8)'s -n flag, since the default behaviour of kenv(1) is already like sysctl(8) -n. Submitted by: Garrett Cooper < yanegomi AT gmail DOT com > MFC after: 1 week Notes: svn path=/head/; revision=235297
* mdoc: fix column names, indentation, column separation within each row, andJoel Dahl2012-04-072-2/+2
| | | | | | | | | | quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer Notes: svn path=/head/; revision=233992
* sh: Fix build with -DDEBUG=2.Jilles Tjoelker2012-04-021-2/+2
| | | | | | | | Reported by: Kristof Provost MFC after: 1 week Notes: svn path=/head/; revision=233792
* mandoc complains loudly when <TAB>s are misused in columnated lists. FixJoel Dahl2012-03-291-31/+31
| | | | | | | | this syntax violation and while I'm here also convert <TAB> to Ta and adjust quotation marks in order to prevent this problem in the future. Notes: svn path=/head/; revision=233665
* Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-293-3/+3
| | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
* Remove superfluous paragraph macro.Joel Dahl2012-03-254-6/+0
| | | | Notes: svn path=/head/; revision=233457
* rm[0].rm_so must be zero (an explicit check is made for zero in theEitan Adler2012-03-191-1/+1
| | | | | | | | | | outer if condition) Reviewed by: se Approved by: cperciva Notes: svn path=/head/; revision=233137
* Document P_ORPHAN.Konstantin Belousov2012-03-081-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=232694
* Bump date to today (since I modified it)Eitan Adler2012-03-031-1/+1
| | | | | | | | | PR: bin/165321 Approved by: gjb MFC after: 3 days Notes: svn path=/head/; revision=232469
* Direct users to swapinfo and pstat from dfEitan Adler2012-03-031-0/+2
| | | | | | | | | | PR: bin/165321 Submitted by: jhs Approved by: bcr MFC after: 3 days Notes: svn path=/head/; revision=232466
* Whitespace cleanup:Glen Barber2012-02-251-2/+4
| | | | | | | | | | | | o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Notes: svn path=/head/; revision=232158
* Fix various typos in manual pages.Glen Barber2012-02-251-3/+3
| | | | | | | | | Submitted by: amdmi3 PR: 165431 MFC after: 1 week Notes: svn path=/head/; revision=232157
* Update to tcsh 6.18.01.Mark Peek2012-02-224-1169/+61
| | | | Notes: svn path=/head/; revision=231990
* sh: Make 'hash' return 1 if at least one utility is not found.Jilles Tjoelker2012-02-111-8/+12
| | | | | | | Reported by: lme Notes: svn path=/head/; revision=231535
* sh: Fix swapped INTON/INTOFF.Jilles Tjoelker2012-02-041-2/+2
| | | | | | | | | | A possible consequence of this bug was a memory leak if SIGINT arrived during a 'set' command (listing variables). MFC after: 1 week Notes: svn path=/head/; revision=231001
* sh: Use vfork in a few common cases.Jilles Tjoelker2012-02-045-0/+64
| | | | | | | | | | | | | | | | | | | | This uses vfork() for simple commands and command substitutions containing a single simple command, invoking an external program under certain conditions (no redirections or variable assignments, non-interactive shell, no job control). These restrictions limit the amount of code executed in a vforked child. There is a large speedup (for example 35%) in microbenchmarks. The difference in buildkernel is smaller (for example 0.5%) but still statistically significant. See http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html for some numbers. The use of vfork() can be disabled by setting a variable named SH_DISABLE_VFORK. Notes: svn path=/head/; revision=230998
* Add prototypes, ANSIfy functions definitions to reduce WARNS=6 output.Philippe Charnier2012-01-255-5/+6
| | | | Notes: svn path=/head/; revision=230530
* sh: Fix $? in the first command of a 'for'.Jilles Tjoelker2012-01-221-1/+4
| | | | | | | | | In the first command of a 'for', $? should be the exit status of the last pipeline (command substitution in the word list or command before 'for'), not always 0. Notes: svn path=/head/; revision=230463
* sh: Remove "kill" example function, which is superseded by the kill builtinJilles Tjoelker2012-01-211-49/+0
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=230437
* Remove unused variables.Ed Schouten2012-01-171-96/+30
| | | | | | | | Simply annotate the function parameters with __unused, instead of adding the ve-variables. This makes the code build with GCC 4.7 and -Werror. Notes: svn path=/head/; revision=230287
* sh: Fix execution of multiple statements in a trap when evalskip is setJean-Sébastien Pédron2012-01-163-2/+34
| | | | | | | | | | | | | | Before this fix, only the first statement of the trap was executed if evalskip was set. This is for example the case when: o "-e" is set for this shell o a trap is set on EXIT o a function returns 1 and causes the script to abort Reviewed by: jilles MFC after: 2 weeks Notes: svn path=/head/; revision=230212
* sh: Fix some bugs with exit status from case containing ;&.Jilles Tjoelker2012-01-151-9/+24
| | | | | | | | | | | | | | | | Also, rework evalcase() to not evaluate any tree. Instead, return the NCLISTFALLTHRU node and handle it in evaltree(). Fixed bugs: * If a ;& list with non-zero exit status is followed by an empty ;; or final list, the exit status of the case command should be equal to the exit status of the ;& list, not 0. * An empty ;& case should not reset $?. Notes: svn path=/head/; revision=230161
* sh: Fix two bugs with case and exit status:Jilles Tjoelker2012-01-151-1/+3
| | | | | | | | | | * If no pattern is matched, POSIX says the exit status shall be 0 (even if there are command substitutions). * If a pattern is matched and there are no command substitutions, the first command should see the $? from before the case command, not always 0. Notes: svn path=/head/; revision=230154
* sh: Change input buffer size from 1023 to 1024.Jilles Tjoelker2012-01-141-6/+6
| | | | | | | PR: bin/161756 Notes: svn path=/head/; revision=230118
* sh: Fix out of bounds array access when trap is used with an invalid signal.Jilles Tjoelker2012-01-141-2/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=230117
* sh: Properly show "Not a directory" error in cd builtin.Jilles Tjoelker2012-01-131-1/+6
| | | | | | | | | | | The errno message display added in r222292 did not take attempting to cd to a non-directory or something that cannot be stat()ed into account. PR: bin/164070 MFC after: 10 days Notes: svn path=/head/; revision=230095
* Spelling fixes for bin/Ulrich Spörlein2012-01-071-1/+1
| | | | Notes: svn path=/head/; revision=229782
* sh: Make various functions static.Jilles Tjoelker2012-01-0110-12/+12
| | | | Notes: svn path=/head/; revision=229220
* sh: Remove unused function scopyn().Jilles Tjoelker2012-01-012-20/+0
| | | | Notes: svn path=/head/; revision=229219
* sh: Make patmatch() non-recursive.Jilles Tjoelker2012-01-011-37/+58
| | | | Notes: svn path=/head/; revision=229201
* sh: Allow quoting ^ and ] in bracket expressions.Jilles Tjoelker2011-12-281-4/+4
| | | | Notes: svn path=/head/; revision=228943
* sh: Use dirent.d_type in pathname generation.Jilles Tjoelker2011-12-281-0/+4
| | | | | | | | | This improves performance for globs where a slash or another component follows a component with metacharacters by eliminating unnecessary attempts to open directories that are not. Notes: svn path=/head/; revision=228942
* sh: Cache de->d_namlen in a local variable.Jilles Tjoelker2011-12-281-6/+8
| | | | Notes: svn path=/head/; revision=228941
* sh: Do not force special builtins non-special in optimized command subst.Jilles Tjoelker2011-12-281-2/+1
| | | | | | | | | | | | This is not necessary: errors are already caught in evalbackcmd() and forcelocal handles changes to variables. Note that this depends on r223024. MFC after: 4 weeks Notes: svn path=/head/; revision=228937
* Fix some obtuse fprintf tricks in bin/ed.Dimitry Andric2011-12-162-18/+20
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=228595
* Add static keywords to chio(1).Ed Schouten2011-12-111-3/+3
| | | | | | | | All other global variables are already marked static, so for consistency sake, add them to these three arrays as well. Notes: svn path=/head/; revision=228423
* Move 3.5 KB from the data segment to the text segment.Ed Schouten2011-12-111-5/+5
| | | | | | | | The `struct modes' are only used by the getter-functions in the same file, so we can safely mark them static and const. Notes: svn path=/head/; revision=228406
* sh: Remove impossible evalskip check in 'for'.Jilles Tjoelker2011-11-271-3/+0
| | | | Notes: svn path=/head/; revision=228015
* sh: Reduce one level of evaltree() recursion when executing 'case'.Jilles Tjoelker2011-11-261-11/+9
| | | | | | | | | | Free expanded case text before executing commands. Remove impossible evalskip checks (expanding an argument cannot set evalskip anymore since $(break) and the like are properly executed in a subshell environment). Notes: svn path=/head/; revision=228013