summaryrefslogtreecommitdiffstats
path: root/bin/sh/miscbltin.c
Commit message (Collapse)AuthorAgeFilesLines
* - 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
* 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".
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Add support for RLIMIT_VMEM. The #ifdef's were already there but getopt()dillon2002-06-261-1/+1
| | | | needed to be adjusted.
* o __P has been reovedimp2002-02-021-9/+3
| | | | | | | | | | | | | | | | | | 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) { ...
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. Thesheldonh2001-07-261-2/+2
| | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
* Fix warnings, some of them serious because sh violated namecracauer2000-04-201-6/+3
| | | | | | | | spaces reserved by the header files it includes. mkinit.c still produces C code with redundant declarations, although they are more harmless since they automatically derived from the right places.
* Implement ulimit -b for RLIMIT_SBSIZE.green1999-10-091-1/+4
|
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Make the behaviour of `read -e', ie. treating backslashes as special,tg1999-08-261-8/+10
| | | | | | | the default. Add -r option for the read builtin to reverse this. PR: 13274 Reviewed by: cpiazza, hoek, sheldonh
* Various spelling/formatting changes.kris1999-05-081-2/+2
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* Free memory from setmode.imp1998-12-161-2/+3
| | | | Obtained from: OpenBSD
* Improve bookkeeping of in_waitcmd and style fixes.cracauer1998-08-251-2/+2
| | | | Submitted by: Bruce Evans
* Do not exit on SIGINT in non-interactive shells, fixes PR 1206,cracauer1998-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | i.e. this makes emacs usable from system(3). Programs called from shellscripts are now required to exit with proper signal status. That means, they have to kill themself. Exiting with faked numerical exit code is not sufficient. Exit with proper signal status if script exits on signal. Make the wait builtin interruptable, both with and without traps set. Use volatile sig_atomic_t where (and only where) appropriate. (Almost) fix printing of newlines on SIGINT. Make traps setable from trap handlers. This is needed for shellscripts that catch SIGINT for cleanup work but intend to exit on it, hance have to kill themself from a trap handler. I.e. mkdep. While I'm at it, make it -Wall clean. -Wall is not enabled in Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c are not -Wall-able. PR: 1206 Obtained from: Basic SIGINT fix from Bruce Evans
* Add rcsid. Spelling.charnier1998-05-181-3/+5
|
* Add the '-t timeout' option to the 'read' builtin. This allows themsmith1997-09-291-4/+63
| | | | | | | | 'read' command to return an error if the user fails to supply any input withink a given time period. The behaviour of this option is similar to that of the like-named option in ksh93. Reviewed by: joerg
* Use the __unused attribute where warranted.steve1997-05-191-6/+6
|
* Nuke register keyword usage and #if -> #ifdef.steve1997-04-281-2/+2
| | | | Obtained from: NetBSD
* 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.
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-141-13/+11
| | | | Obtained from: NetBSD, me
* eek, how did that happen? I must have committed something left over frompeter1996-09-031-4/+4
| | | | when I was experimenting looking for an alternate format. *blush*
* Fix for PR#1287. This makes sh behave sensibly in case statements in thepeter1996-09-031-4/+5
| | | | | | | | | | | | | | face of aliases. Note, bash doesn't do aliases while running scripts, but "real" ksh does.. Also: Reduce redundant .Nm macros in (unused) bltin/echo.1 nuke error2, it's hardly used. More -Wall cleanups dont do certain history operations if NO_HISTORY defined handle quad_t's from resource limits Submitted by: Steve Price <sprice@hiwaay.net> (minor tweaks by me)
* Misc cleanups and fixes from Bruce:peter1996-09-031-22/+33
| | | | | | | | | | - don't put \n on error() calls, error adds it already. - don't prepend "ulimit" on error() calls in miscbltin.c. - getopt typo on ulimit -p -> -u conversion - get/setrlimit() calls were not being error checked ulimit formatting cleanup from me, use same wording as bash on Bruce's suggestion. Add ulimit arg to output on Joerg's suggestion.
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is apeter1996-09-011-208/+216
| | | | | | | | | | | | | | 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
* o rename ulimit -p into ulimit -u, so we are in agreement with bashjoerg1995-10-211-4/+4
| | | | | | | o fix brokeness for 1>&5 redirection, where `5' was an invalid file descriptor, but no error message has been generated o fix brokeness for redirect to/from myself case
* Implement the "ulimit" builtin. This is the analogon to csh's "limit"joerg1995-10-191-1/+214
| | | | | | | | | command and badly needed in sh(1) for everybody who wants to modify the system-wide limits from inside /etc/rc. The options are similar to other system's implemantations of this command, with the FreeBSD additions for -m (memoryuse) and -p (max processes) that are not available on other systems.
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+166
OpenPOWER on IntegriCloud