summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Restored clobbered parts of rev.1.15 (build intermediate object filesbde1997-08-251-2/+14
| | | | for tools).
* Make all status values an integral type and usesteve1997-08-182-7/+8
| | | | pid_t when referring to process IDs.
* Back out previous fix - this bug's got diplomatic immunity as a registeredjkh1997-06-191-3/+1
| | | | political issue.
* >Number: 3780jkh1997-06-191-1/+3
| | | | | | | | >Category: bin >Synopsis: WEXITSTATUS() may return nagative value, which causes sh to generate bad $? PR: 3780 Submitted by: sanewo@ba2.so-net.or.jp
* Now [^abc] means the same as [!abc] like bash and *csh already doesache1997-06-061-4/+4
|
* Make sh(1) less aware of the bit fields returned by wait bysteve1997-05-241-33/+42
| | | | | | | using the WIF* macros in sys/wait.h. PR: bin/3668 Submitted by: dholland@eecs.harvard.edu
* Remove y.tab.h from the beforedepend target. Also add asteve1997-05-211-2/+3
| | | | | | rule that shows the dependency of arith_lex.[co] on y.tab.h. Suggested by: Bruce Evans <bde@zeta.org.au>
* Add explicit y.tab.h rule so that 'make depend clean all' doessteve1997-05-191-2/+4
| | | | not fail with an "don't know how to make y.tab.h" error.
* Use the __unused attribute where warranted.steve1997-05-1911-47/+47
|
* Miscellaneous sorting and addition of rules for object files thatsteve1997-05-191-11/+25
| | | | | | depend on generated headers. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Revise the section that explains how to protect parts of an $ENV scriptsteve1997-05-071-20/+12
| | | | | | from being executed in non-interactive mode. Suggested and Reviewed by: Brian Somers <brian@freebsd.org>
* Don't source $ENV unless this is an interactive shell.steve1997-05-051-2/+2
|
* Turn on the new type builtin.steve1997-04-281-1/+2
|
* Sync with NetBSD's revision 1.29 of this file.steve1997-04-281-27/+55
| | | | Obtained from: NetBSD
* Remove an extra semicolon and nuke register keyword usage.steve1997-04-281-7/+7
|
* Fix redirection of unopened file descriptors and nuke registersteve1997-04-281-9/+27
| | | | | | keyword usage. Obtained from: NetBSD
* Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879.steve1997-04-281-49/+29
|
* mdoc-ify and cleanup UNIMPLEMENTED messages. Closes PR 2880.steve1997-04-281-735/+587
|
* Reorder declarations slightly.steve1997-04-281-3/+3
|
* Avoid a possible NULL pointer dereference, nuke register usage,steve1997-04-281-6/+5
| | | | | | and remove an unnecessary reset. Obtained from: NetBSD
* Nuke register keyword usage, #if -> #ifdef, and avoid void *steve1997-04-282-13/+13
| | | | | | arithmetic. Obtained from: NetBSD
* Nuke register keyword usage, rename pread to preadfd, and opensteve1997-04-281-7/+9
| | | | | | input files FD_CLOEXEC. Obtained from: NetBSD
* When NO_HISTORY is defined and the history command is usedsteve1997-04-281-3/+16
| | | | | | show an error message. Inspired by: NetBSD
* Add a type builtin and nuke register keyword usage.steve1997-04-282-5/+81
| | | | Obtained from: NetBSD
* Nuke register keyword usage and #if -> #ifdef.steve1997-04-2814-65/+65
| | | | Obtained from: NetBSD
* Shamelessly pilfer most of NetBSD's Makefile so that thesteve1997-04-281-28/+16
| | | | | | | | problem with 'make -j n' and no .depend file goes away. I think Bruce mentioned this somewhere on one of the mailing lists. Obtained from: NetBSD
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-2268-68/+68
|
* Fix a expansion bug that caused the result of `echo $((1 << 30))`steve1997-02-161-2/+5
| | | | | | to get truncated. Submitted by: bde
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1468-68/+68
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix a problem that caused some foreground pipelines to die with:steve1997-01-061-3/+2
| | | | | | tcsetpgrp failed, errno=1 Discovered and Reviewed by: joerg
* Make sh(1) think and be in the same place at the same time. This closessteve1997-01-041-15/+11
| | | | PR#2331: strange output of sh's pwd on symlinked directories.
* With these changes sh(1)'s trap command should be POSIX-compliant,steve1996-12-241-49/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | while remaining (becoming :) compatible with other popular shells. Specifically these changes include: 1) Implement 'trap -l' to get a list of valid signals names. This is useful if you wanted to do something like reset all signal handlers to there defaults values, in which case something like this will do the trick. trap `trap -l` 2) Reformat the output of 'trap' so it can be saved and later eval'd to restore the saved settings. 3) Allow the use of signal names as well as signal numbers. 4) Fix trap handling of SIGCHLD so that commands like the following (albeit, contrived) won't cause sh(1) to recurse ad infinitum. trap uname 0 20 5) Make variables static that are used only in trap.c. 6) Minor 'style(9) police' mods.
* Oops, it needs little more caulk to get it right.steve1996-12-231-2/+2
|
* Apply a little dab of bit caulk to keep those beggarssteve1996-12-231-6/+2
| | | | | | from leaking out. Noticed by: bde
* Don't use _POSIX_PATH_MAX to limit the size of the path, insteadsteve1996-12-231-3/+3
| | | | | | use 'getcwd(NULL, 0)' just as pwd(1) does. Suggested by: bde
* Make sh(1) a little braver in the face of adversity. sh(1)steve1996-12-214-169/+21
| | | | | | | now handles the getpwd() init problem the same way as bash and ksh do. Also while I was in here, I cleaned up the format a little, removed some unnnecessary #if SYMLINKS cruft, and changed the pwd builtin to use getcwd(3) as Joerg suggested.
* This doesn't change any behavior, but may be a slightsteve1996-12-211-2/+2
| | | | | | optimization. (num-- > 0) --> (--num >= 0). Obtained from: NetBSD
* Remove extra #undef.steve1996-12-211-2/+1
|
* Fix a problem caused by finger failure on my part. The builtinsteve1996-12-211-3/+7
| | | | | | | | getopts should now work as expected. This fix was in the NetBSD code that I was merging from but missed getting into FreeBSD's version because of 'drain bamage' on my part. Submitted by: NetBSD, joerg
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-1443-491/+908
| | | | Obtained from: NetBSD, me
* Back out rev 1.7 which was to fix PR#1206 (to be reopened).peter1996-11-121-19/+2
| | | | | | | | | | This patch causes too many side effects, one of which bites hard is when interrupting a 'make fetch' in the ports tree (PR#1990). This whole area is a real can of worms.... This most definately should go into 2.2 Reviewed by: steve, bde
* 1) define STATIC as static and not emptyache1996-10-312-4/+22
| | | | 2) replace collate_range_cmp call with its code
* Add the -p (privileged) commandline switchsteve1996-10-294-8/+31
| | | | | | found in bash, zsh, and friends. Reviewed by: joerg
* Build intermediate object files for mkinit, mknodes and mksyntaxbde1996-10-251-6/+19
| | | | | | | | so that simple regresssion tests based on `cmp' work. mkdep still doesn't work right for these tools. They should probably be in separate directories. Sorted dependencies.
* Close PR# 1206. sh(1) now ignores SIGINT and SIGQUITsteve1996-10-221-3/+19
| | | | | | | when a child is forked and the -c commandline switch has been specified. Reviewed by: joerg
* Benign | --> || correction.steve1996-10-161-2/+2
|
* Fix a problem with sh that conflicts with the -esteve1996-10-061-2/+5
| | | | | | | | | flag text in the man page. Now this will work correctly: /bin/sh -ec 'false && true; echo hi' Obtained from: VaX#n8 <vax@linkdead.paranoia.com>
* re-activate the printf builtin now that src/usr.bin/printf.c has beenpeter1996-10-011-2/+2
| | | | | tweaked to work as a builtin better (ie: calls the real printf formatting code, not sh's cut-down out1fmt() function)
* Mend 'exit' without breaking 'exit 1'adam1996-09-121-3/+4
| | | | | | *blush* %-\ Pointed out by: bruce
OpenPOWER on IntegriCloud