[PATCH] manual: Document mprotect and introduce section on memory protection

Florian Weimer fweimer@redhat.com
Sun Nov 19 10:27:00 GMT 2017


On 11/19/2017 12:49 AM, Rical Jasan wrote:

>>>> +@var{protection} is a combination of the @code{PROT_*} flags described
>>>> +above.
>>>> +
>>>
>>> The return values of the function are also missing:
>>>
>>> "@code{mprotect} returns @code{0} on success or @code{-1} on error."
>>
>> Do we use @code{-1} or @math{-1}?  Existing practice is incosistent.
> 
> @math is for mathematical expressions, and the Texinfo manual says: "In
> essence, @math switches into plain TeX math mode." [1]  While the
> Texinfo manual never explicitly states return values should be formatted
> with @code, consider the example they use for how @code looks when it's
> rendered: "The function returns @code{nil}." [2]

$nil$ is a product of the variables $n$, $i$, $l$, so it's clearly 
different.  In LaTeX, inside a mathematical expression, you would use 
something like $\mathrm{nil}$, or more likely, a special symbol.

Thanks,
Florian



More information about the Libc-alpha mailing list