* Re: [bug] Error in mprotect man page description of return value
[not found] ` <CAMJx9yDV3ez0UzqsNn_ub9tOGGVJsN11LkDz_r_VQqC0NW3CGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-05-30 10:58 ` Michael Kerrisk
0 siblings, 0 replies; only message in thread
From: Michael Kerrisk @ 2013-05-30 10:58 UTC (permalink / raw)
To: Kennon Bittick; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
On 05/29/13 00:30, Kennon Bittick wrote:
> Hello,
>
> I would like to report what I believe is an error in the man page of
> mprotect. The description of the return value says:
>
> "Upon successful completion, mprotect() shall return 0; otherwise, it
> shall return -1 and set errno to indicate the error."
>
> However, in my use the behavior does not match this. I reviewed the
> source code, and it appeared to match my experience rather than the
> man pages' description. Instead, the function returns (error_code *
> -1) and does not change errno.
>
> I am new to bug reporting, so I apologize if I have made a mistake in
> the format or content of the report. Thank you.
Kennon,
How are you calling mprotect()? The wrapper function does the
manipulation of errno. See syscalls(2).
Cheers,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread