diff options
author | 2014-06-26 18:30:36 +0000 | |
---|---|---|
committer | 2014-06-26 18:30:36 +0000 | |
commit | b9bb578f08c05d223498fe9807da29528eea8ef3 (patch) | |
tree | 3bfbcfab5d6cfcad53b481850108e6d240ddf44d | |
parent | Create temporary file with mkstemp and unlink if rename operation fails. (diff) | |
download | wireguard-openbsd-b9bb578f08c05d223498fe9807da29528eea8ef3.tar.xz wireguard-openbsd-b9bb578f08c05d223498fe9807da29528eea8ef3.zip |
Document that mmap() confirms to POSIX 2008, except that we generate
SIGSEGV instead of SIGBUS for page references beyond the end of a
mapped object.
-rw-r--r-- | lib/libc/sys/mmap.2 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index 5295f09dc0d..7160a8bb9e2 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mmap.2,v 1.43 2014/01/21 03:15:45 schwarze Exp $ +.\" $OpenBSD: mmap.2,v 1.44 2014/06/26 18:30:36 matthew Exp $ .\" $NetBSD: mmap.2,v 1.5 1995/06/24 10:48:59 cgd Exp $ .\" .\" Copyright (c) 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)mmap.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: January 21 2014 $ +.Dd $Mdocdate: June 26 2014 $ .Dt MMAP 2 .Os .Sh NAME @@ -253,11 +253,26 @@ was specified and insufficient memory was available. .Xr msync 2 , .Xr munmap 2 , .Xr getpagesize 3 +.Sh STANDARDS +The +.Fn mmap +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn mmap system call first appeared in .Bx 4.1c . +.Sh CAVEATS +.St -p1003.1-2008 +specifies that references to pages beyond the end of a mapped object +shall generate a +.Dv SIGBUS +signal; however, +.Ox +generates a +.Dv SIGSEGV +signal in this case instead. .Sh BUGS Due to a limitation of the current vm system (see .Xr uvm 9 ) , |