[patch] mprotect.2: update example program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



man-pages version: latest git repository
why: The description of the example program says that it makes
the third page "read-only". Thus PROT_READ instead of PROT_NONE.


diff --git a/man2/mprotect.2 b/man2/mprotect.2
--- a/man2/mprotect.2
+++ b/man2/mprotect.2
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
printf("Start of region: 0x%lx\\n", (long) buffer);

if (mprotect(buffer + pagesize * 2, pagesize,
- PROT_NONE) == \-1)
+ PROT_READ) == \-1)
handle_error("mprotect");

for (p = buffer ; ; )

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux