aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/sh.1
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1995-10-19 18:42:12 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1995-10-19 18:42:12 +0000
commit7a2afe644c45728b93a82e743e3bd49df17c3f43 (patch)
tree34fc9c6cecb8198ab3b89983e080bd34b2203ea9 /bin/sh/sh.1
parentc2cb0dfbf0565424558fef067591ba43770fd8c3 (diff)
downloadsrc-7a2afe644c45728b93a82e743e3bd49df17c3f43.tar.gz
src-7a2afe644c45728b93a82e743e3bd49df17c3f43.zip
Implement the "ulimit" builtin. This is the analogon to csh's "limit"
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.
Notes
Notes: svn path=/head/; revision=11571
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r--bin/sh/sh.154
1 files changed, 53 insertions, 1 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 989b214d20a7..a5201a253130 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -33,7 +33,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)sh.1 8.4 (Berkeley) 4/18/94
-.\" $Id: sh.1,v 1.2 1994/09/24 02:58:13 davidg Exp $
+.\" $Id: sh.1,v 1.3 1995/05/05 16:49:15 adam Exp $
+.\"
+.\"
.\"
.na
.TH SH 1
@@ -1277,6 +1279,56 @@ resets trapped (but not ignored) signals to the
default action. The trap command has no effect on
signals that were ignored on entry to the shell.
.TP
+ulimit [ -HSacdflmnpst ] [ limit ]
+Set or display resource limits (see getrlimit(2)).
+If ``limit'' is specified, the named resource will be set;
+otherwise the current resource value will be displayed.
+.br
+If ``-H'' is specified, the hard limits will be
+set or displayed. While everybody is allowed to reduce a
+hard limit, only the superuser can increase it. Option ``-S''
+specifies the soft limits instead. When displaying limits,
+only one of ``-S'' or ``-H'' can be given. The default is
+to display the soft limits, and to set both, the hard and
+the soft limits.
+.br
+Option ``-a'' requests to display all resources. The parameter
+``limit'' is not acceptable in this mode.
+.br
+The remaining options specify which resource value is to be
+displayed or modified. They are mutually exclusive.
+.RS +.7i
+.TP 2
+-c coredumpsize
+The maximal size of core dump files, in 512-byte blocks.
+.TP 2
+-d datasize
+The maximal size of the data segment of a process, in kilobytes.
+.TP 2
+-f filesize
+The maximal size of a file, in 512-byte blocks. This is the
+default.
+.TP 2
+-l lockedmem
+The maximal size of memory that can be locked by a process, in
+kilobytes.
+.TP 2
+-m memoryuse
+The maximal resident set size of a process, in kilobytes.
+.TP 2
+-n nofiles
+The maximal number of descriptors that could be opened by a process.
+.TP 2
+-p procmax
+The maximal number of simultaneous processes for this user ID.
+.TP 2
+-s stacksize
+The maximal size of the stack segment, in kilobytes.
+.TP 2
+-t time
+The maximal amount of CPU time to be used by each process, in seconds.
+.RE
+.TP
umask [ mask ]
Set the value of umask (see umask(2)) to the specified octal value.
If the argument is omitted, the