OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / mprotect.2
index 220f947..dbd536d 100644 (file)
 .\" Modified 2004-08-16 by Andi Kleen <ak@muc.de>
 .\" 2007-06-02, mtk: Fairly substantial rewrites and additions, and
 .\" a much improved example program.
+.\"
 .\" FIXME The following protection flags need documenting:
 .\"         PROT_SEM
 .\"         PROT_GROWSDOWN
 .\"         PROT_GROWSUP
 .\"         PROT_SAO (PowerPC)
 .\"
-.TH MPROTECT 2 2012-08-14 "Linux" "Linux Programmer's Manual"
+.TH MPROTECT 2 2014-01-05 "Linux" "Linux Programmer's Manual"
 .SH NAME
 mprotect \- set protection on a region of memory
 .SH SYNOPSIS
@@ -73,8 +74,6 @@ The memory can be modified.
 .TP
 .B PROT_EXEC
 The memory can be executed.
-.\" FIXME
-.\" Document PROT_GROWSUP and PROT_GROWSDOWN
 .SH RETURN VALUE
 On success,
 .BR mprotect ()
@@ -140,7 +139,7 @@ implies
 POSIX.1-2001 says that an implementation may permit access
 other than that specified in
 .IR prot ,
-but at a minimum can only allow write access if
+but at a minimum can allow write access only if
 .B PROT_WRITE
 has been set, and must not allow any access if
 .B PROT_NONE
@@ -176,7 +175,7 @@ Got SIGSEGV at address: 0x804e000
 #define handle_error(msg) \\
     do { perror(msg); exit(EXIT_FAILURE); } while (0)
 
-char *buffer;
+static char *buffer;
 
 static void
 handler(int sig, siginfo_t *si, void *unused)
@@ -226,3 +225,12 @@ main(int argc, char *argv[])
 .SH SEE ALSO
 .BR mmap (2),
 .BR sysconf (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.