summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix references to non-existing or obsoleted man pages.schweikh2003-04-301-2/+1
| | | | | PR: docs/51480 (only a small part) Submitted by: Diomidis D. Spinellis <dds@aueb.gr>
* Document the -L and -P options to the cd and pwd commands as beingtjr2003-04-121-3/+3
| | | | | | mutually exclusive. The fact that the most recent one specified on the command line is the one that takes effect is an implementation detail and users should not rely on this.
* Flush the output buffers before forking a child process to avoidtjr2003-03-171-0/+1
| | | | | | | the child process writing data that the parent should have written. PR: 50051 MFC after: 2 weeks
* Fixed (soon might be fatal) -Wformat warnings.ru2003-03-151-2/+3
|
* Third attempt at removing machdep.h and using ALIGN from <sys/param.h>.marcel2003-02-243-101/+54
| | | | | | | | | | | | | | The initial stack_block is staticly allocated and will be aligned according to the alignment requirements of pointers, which does not necessarily match the alignment enforced by ALIGN. To solve this a more involved change is required: remove the static initial stack and deal with an initial condition of not having a stack at all. This change is therefore more risky than the previous ones, but unavoidable (other than not using the platform default alignment). Discussed with: tjr Approved and reviewed by: tjr Tested on: alpha, i386, ia64 and sparc64
* Revert ALIGN change for the second and last time. I can't figure outtjr2003-02-183-6/+56
| | | | why this is breaking sparc64.
* Second attempt at removing machdep.h and using ALIGN from <sys/param.h>.tjr2003-02-173-56/+6
| | | | | | The problem with the previous attempt, as noticed by Marcel, was that stacknxt was being aligned to a pointer boundary instead of an ALIGNBYTES + 1 boundary, which broke sparc64.
* Temporarily back out machdep.h/ALIGN changes. It seems that on sparc64,tjr2003-02-163-4/+54
| | | | | | using the alignment from sys/param.h (16) instead of the alignment from machdep.h (8) tickled a nasty bug in the memory allocator that I haven't been able to track down yet.
* Use the ALIGN macro from <sys/param.h> instead of defining our owntjr2003-02-143-54/+4
| | | | incorrect version in machdep.h. Delete machdep.h.
* Add FBSDID.charnier2003-02-051-1/+3
|
* Improve the layout of the description of the various parameter expansionfanf2003-02-031-0/+2
| | | | | modifiers. The paragraph that explains the difference between ${foo:-bar} and ${foo-bar} etc. was not very visible.
* Ensure that the TTY file descriptor is greater than or equal to 10 so thattjr2003-01-271-1/+14
| | | | | | | it doesn't interfere with the user's redirections. PR: 47136 MFC after: 1 week
* Make this compile with DEBUG defined now that WARNS=0 has been removedtjr2003-01-213-2/+4
| | | | | | | | from the Makefile: - Print pointers with %p instead of %x. - Include missing headers to get prototypes. Noticed by: benno
* Do not strip CTL* escapes from redirection filenames in exptilde(),tjr2003-01-081-4/+4
| | | | | | | | expari(), expbackq() and evalvar(). Similar to revision 1.39. Patch from Tor Egge. PR: 45349 MFC after: 2 weeks
* Add the "wordexp" shell built-in command which will be used to implementtjr2002-12-263-0/+24
| | | | the POSIX wordexp() function.
* mdoc(7) police: Deal with self-xrefs.ru2002-12-241-1/+1
|
* mdoc(7) police: markup nit.ru2002-12-231-1/+1
|
* Use '\033' rather than '\e' as the latter is a gccism.dwmalone2002-12-221-1/+1
| | | | | | PR: 46015 Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl> MFC after: 1 week
* The code uses trapsasync, however the manual page uses asynctraps. Fix thetrhodes2002-12-171-1/+1
| | | | | | | | manual page to reflect the code. PR: 45820 Submitted by: Marco Molteni <molter@tin.it> Discussed with: tjr
* Document `trap EXIT` and `trap SIGNAME`.fanf2002-12-171-1/+4
|
* When job control is disabled, never show the job id when reporting thetjr2002-12-141-1/+2
| | | | status of a background process that has terminated because of a signal.
* Capitalize ASCII code names.ru2002-12-051-1/+3
| | | | Approved by: re
* Delete worthless comments.tjr2002-10-301-5/+1
|
* Avoid accidentally making "-h" a synonym for "fc".tjr2002-10-181-1/+1
| | | | Obtained from: NetBSD
* Do not strip CTL* escapes from redirection filenames in argstr(); theytjr2002-10-081-1/+1
| | | | | | | | are later stripped with rmescapes() in expandarg(). If the filename has already been unescaped, doing it again in rmescapes() can walk off the end of the string, leading to memory corruption and eventually SIGSEGV. Noticed by: kris
* Disallow empty condition parts of "if", "while" and "until" compoundtjr2002-10-061-3/+6
| | | | | | commands. Commands like "if then ... fi" and "while do ... done" are no longer accepted. Bodies of compound commands are still allowed to be empty, because even though POSIX does not allow them, most shells do.
* Use %d in a printf() format string and cast the argument to int instead oftjr2002-10-021-1/+1
| | | | | using %td when we know that the number is between 0 and 9; mksyntax is a build tool and needs to work on -stable.
* Back out experimental changes to fmtstr() that I didn't mean to includetjr2002-10-011-1/+9
| | | | in the previous commit.
* Replace a home-grown printf() clone with a fwopen() wrapper aroundtjr2002-10-011-190/+23
| | | | | libc's vfprintf() that writes to a `struct output' instead of a file. Inspired by NetBSD's similar changes (they used asprintf() instead).
* It is now safe to remove WARNS=0 and WFORMAT=0.mux2002-10-011-2/+0
| | | | Tested on: alpha, i386, sparc64
* Restore "not found" error message when searching for (or executing)tjr2002-10-011-2/+8
| | | | | | a program fails because the file or a path component does not exist. Suggested by: bde
* - Don't use quad_t when we really mean rlim_t.mux2002-10-011-5/+6
| | | | | | | | - Cast rlim_t to intmax_t when printing it. This should fix the last format errors in sh(1). Tested on: i386, sparc64
* Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format stringtjr2002-10-011-0/+2
| | | | errors with %qd formats.
* Use the %t format modifier to print differences betweenmux2002-10-012-2/+2
| | | | | | | | | | | pointers. This fixes two format warnings on 64 bits archs which are fatal now that WFORMAT=0 has been removed. It doesn't fully fix the sh(1) build on 64 bits platforms though, there is still some quad_t issues that need to be fixed. Tested on: i386, sparc64
* Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2tjr2002-10-011-2/+0
| | | | | on at least i386. If there are warnings on other archs, I'd rather hear about them than pretend they didn't exist.
* 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-014-41/+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.
* Callers of error() don't need to supply a program name prefix in thetjr2002-09-301-6/+6
| | | | error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
* Allow a left parenthesis before patterns in case blocks. POSIX requirestjr2002-09-301-0/+2
| | | | us to accept this, but I've never seen a script that uses it.
* Allow empty case/esac statements; POSIX requires this, and recent versionstjr2002-09-301-2/+2
| | | | | | | of autoconf are generating scripts that use this feature. PR: 43275 35879 Submitted by: Dan Nelson <dnelson@allantgroup.com>
* Remove dead code which supported systems without O_APPEND, O_CREAT or SIGTSTP.tjr2002-09-292-34/+0
|
* Convert the remaining callers of errmsg() to use strerror(), and removetjr2002-09-294-111/+13
| | | | errmsg() and its table of error messages.
* Correct a usage of fnctl that could not be right and results in anectar2002-09-111-1/+1
| | | | no-op. I assume it was meant that the close-on-exec flag be set here.
* Add <stdlib.h> to get a prototype for exit().keramida2002-08-291-0/+1
| | | | Reviewed by: tjr
* Replace various spellings with FALLTHROUGH which is lint()ablecharnier2002-08-252-2/+2
|
* There is a built-in command called "builtin"; spell its name correctlytjr2002-08-241-1/+1
| | | | after rev. 1.77 called it "built-in".
* Don't show the process ID of background jobs that have terminated,tjr2002-08-241-1/+1
| | | | for consistency with ksh.
* s/filesystem/file system/ as discussed on -developerstrhodes2002-08-212-3/+3
|
* Fix a few typos, among them s/builtin/built-in/ (except for the refschweikh2002-08-211-36/+36
| | | | | | | to the builtin(1) man page.) This is for consistency with the spelling both proposed by ispell as well as IEEE Std 1003.1-2001. MFC after: 3 days
* Avoid accessing the current job's process table in the child part oftjr2002-08-181-3/+5
| | | | | | forkshell() after it has been freed. This caused mysterious behaviour when anything but the first command in a pipeline tried to access the terminal when the `junk' malloc() option was enabled (which is the default).
OpenPOWER on IntegriCloud