2011/8/31 Seonghun Lim <wariua@xxxxxxxxx>:
> 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.
Thanks. Applied for 3.33.
Cheers,
Michael
> 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 ; ; )
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
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
[Netdev]
[Linux Ethernet Bridging]
[Linux Wireless]
[Kernel Newbies]
[Memory]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]
[Video 4 Linux]
[Linux Resources]