summaryrefslogtreecommitdiffstats
path: root/bin/sh/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Add the POSIX option -p to the jobs builtin command. It prints the PID of thestefanf2006-10-071-1/+1
| | | | | | | | process leader for each job. Now the last specified option for the output format (-l, -p or -s) wins, previously -s trumped -l. PR: 99926 Submitted by: Ed Schouten and novel (patches modified by me)
* Issue an error when . (dot) is invoked without a filename. The synopsisstefanf2006-04-021-8/+10
| | | | | | | is just ". file" according to POSIX, however many other shells allow arguments to be passed after the file. For compatibility (we even use that feature in buildworld) additional arguments are not considered to be an error, even though this shell does not do anything with the arguments at all.
* Initialize PWD early on (don't expect it to be inherited from theschweikh2006-02-041-0/+2
| | | | | | environment or set it only when changing directories with cd). PR: standards/92640
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* Remove some kind of profiling support that required the 4.2BSD monitor()tjr2002-10-011-12/+0
| | | | function in libc.
* Remove bits and pieces of support for atty, which was made obsolete bytjr2002-10-011-5/+1
| | | | | | adding history and vi/emacs-style line editing to the shell itself. Atty was a user-mode terminal emulator (like screen and window) that did line editing and history.
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Add -s (output PID's only) and -l (show PID's) options to the jobs(1)tjr2002-05-311-1/+1
| | | | builtin. Modify the output format to match what SUSv3 requires.
* o __P has been reovedimp2002-02-021-32/+10
| | | | | | | | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
* From submitter:cracauer2000-08-161-1/+2
| | | | | | | | | | | | | | | | | growstackblock() sometimes relocates a stack_block considered empty without properly relocating stack marks referencing that block. The first call to popstackmark() with the unrelocated stack mark as argument then causes sh to abort. Relocating the relevant stack marks seems to solve this problem. The patch changes the semantics of popstackmark() somewhat. It can only be called once after a call to setstackmark(), thus cmdloop() in main.c needs an extra call to setstackmark(). PR: bin/19983 Submitted by: Tor.Egge@fast.no Reviewed by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* Use #include <errno.h> rather than extern int errno;.imp2000-04-141-2/+1
|
* Include strerror(errno) in error messages after failed system calls.cracauer1999-11-291-1/+1
| | | | Fix a warning.
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Various spelling/formatting changes.kris1999-05-081-2/+2
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* Add rcsid. Spelling.charnier1998-05-181-3/+5
|
* Don't source $ENV unless this is an interactive shell.steve1997-05-051-2/+2
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Make sh(1) a little braver in the face of adversity. sh(1)steve1996-12-211-2/+3
| | | | | | | 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.
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-141-17/+39
| | | | Obtained from: NetBSD, me
* Add the -p (privileged) commandline switchsteve1996-10-291-3/+6
| | | | | | found in bash, zsh, and friends. Reviewed by: joerg
* Mend 'exit' without breaking 'exit 1'adam1996-09-121-3/+4
| | | | | | *blush* %-\ Pointed out by: bruce
* Backed out last change. It broke even `exit 1'.bde1996-09-121-4/+2
|
* let the "exit" command return status when it is implicitadam1996-09-081-2/+4
|
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is apeter1996-09-011-23/+75
| | | | | | | | | | | | | | merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
* Localize itache1996-08-111-1/+4
|
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
| | | | Reviewed by: phk
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+304
OpenPOWER on IntegriCloud