Added EINVAL error for rlim_cur > rlim_max when calling setrlimit().

This commit is contained in:
Michael Kerrisk 2005-10-24 15:26:31 +00:00
parent 8e33676f52
commit b270eba946
1 changed files with 15 additions and 1 deletions

View File

@ -339,7 +339,12 @@ points outside the accessible address space.
.TP
.B EINVAL
.I resource
is not valid.
is not valid;
or, for
.BR setrlimit ():
.IR rlim->rlim_cur
was greater than
.IR rlim->rlim_max .
.TP
.B EPERM
An unprivileged process tried to use \fBsetrlimit\fP() to
@ -373,6 +378,15 @@ was calculated as
.IR "19\ \-\ rlim_cur" .
This was fixed in kernel 2.6.13.
.\" see http://marc.theaimsgroup.com/?l=linux-kernel&m=112256338703880&w=2
Kernels before 2.4.22 did not diagnose the error
.B EINVAL
for
.BR setrlimit ()
when
.IR rlim->rlim_cur
was greater than
.IR rlim->rlim_max .
.SH "CONFORMING TO"
SVr4, 4.3BSD.
.BR RLIMIT_MEMLOCK