mirror of https://github.com/mkerrisk/man-pages
Added note on Linux's old (pre-2.6.12) buggy treatment of length==0.
This commit is contained in:
parent
835c4d5ce4
commit
c8f3e58070
15
man2/mmap.2
15
man2/mmap.2
|
@ -415,6 +415,21 @@ flag only has effect if
|
|||
.I prot
|
||||
is specified as
|
||||
.BR PROT_NONE .
|
||||
|
||||
SUSv3 specifies that
|
||||
.BR mmap ()
|
||||
should fail if
|
||||
.I length
|
||||
is 0.
|
||||
However, in kernels before 2.6.12,
|
||||
.BR mmap ()
|
||||
succeeded in this case: no mapping was created and the call returned
|
||||
.IR start .
|
||||
Since kernel 2.6.12,
|
||||
.BR mmap ()
|
||||
fails with the error
|
||||
.B EINVAL
|
||||
for this case.
|
||||
.SH "SEE ALSO"
|
||||
.BR getpagesize (2),
|
||||
.BR mincore (2),
|
||||
|
|
Loading…
Reference in New Issue