blob: 02be10d8c241482eedffc1ebe77bdec1c26bc5d3 [file] [log] [blame]
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel=stylesheet type="text/css" href="style.css" title="style">
TODO list for the Linux man-pages project
<form method="get" action="">
<table border=0 cellpadding=0 cellspacing=0 width="100%">
<td align="left">
<font size="-1">
Linux <em>man-pages</em>: &nbsp;
<a href="./index.html">home</a> |
<a href="./contributing.html">contributing</a> |
<a href="./reporting_bugs.html">bugs</a> |
<a href="./patches.html">patches</a> |
<a href="./download.html">download</a>
&nbsp; || &nbsp;
<a href="">git</a> |
<a href="">online pages</a></font>
<td align="right">
<input type="text" name="q" size=10 maxlength=255 value="">
<input type="hidden" name="sitesearch" value="">
<input type="submit" name="sa" value="Search online pages">
<h1>TODO list for the Linux <em>man-pages</em> project</h1>
There are many things that might or should be done in the future
for <em>man-pages</em>.
This page describes a few of them.
Help with, or opinions about, these ideas is welcome.
<a href="#migrate_to_kernel_source">Migrate <em>man-pages</em>
into the kernel source tree (?)</a>
<a href="#new_markup">Design and adopt a new mark-up language (?)</a>
<a href="#style_guide">Devise or adopt a style guide</a>
<a name="migrate_to_kernel_source"></a>
<h2>Migrate <em>man-pages</em> into the kernel source tree (?)</h2>
This idea has been floated by a few people.
There are some advantages:
It might encourage kernel developers to work on
man pages by placing them in the same location as the kernel source code.
Kernel source code patches changing the behavior of kernel-userland
interfaces could include patches to the corresponding
man page text, and thus documentation patches could flow up the
maintainer chain in the usual fashion.
There are also some disadvantages:
The split between system calls and library functions is not
clear cut from the point of view of the userland programmer.
Sometimes, glibc wrappers do some extra work before invoking
the underlying system call.
Currently, the section 2 pages document the behavior of the
glibc wrapper, which may be different from the underlying system call,
and attempt (i.e., it's the goal, but not all pages do this well)
to include NOTES that describe differences in the
underlying system call.
(For example, see the "C library/kernel ABI differences" in the
<a href="">NOTES
section of <em>select(2)</em></a>.)
In addition, the man pages for system calls document
other user space details, such as header file requirements,
feature test macro requirements for glibc,
thread-safety (under the ATTRIBUTES section),
One way to address this would be to truly separate the system call and
glibc wrapper information into two separate pages, one in Section 2,
the other in Section 3.
But this would require one of the following approaches,
each of which has its problems:
Document the pure system call in a Section 2 page, and then document
the differences provided by the glibc wrapper in a corresponding
Section 3 page.
The problem is that this would require userland programmers
(the main audience of the pages)
to look at two separate pages to get the information they require.
Document the pure system call in a Section 2 page, and
then document the complete behavior of the glibc wrapper
in Section 3, repeating material from the
Section 2 page as appropriate.
The problem here is redundancy: any changes in the Section
2 page would need to be carried through to the Section 3 page;
inevitably, inconsistencies will arise.
<em>Note:</em> I (mtk) am doubtful that the problem noted in
the above point could be resolved
via some "include" mechanism that includes relevant
pieces from the Section 2 page into the Section 3 page.
I think that would make the man page source files more difficult
to work with, and would likely be error-prone in practice
(because the producers of the "include" mark-up (man2) would
be separate from the consumers of that mark-up (man3)).
And of course it's worth noting that implementing either of
the above approaches would be a significant piece of work.
Many pages in Section 3 and in Sections 5 and 7 relate
purely to glibc.
If those pages are not to be migrated into the kernel source tree
(it makes little sense to do that), then
they should be split out into a separate package.
This raises several issues:
Where should the "glibc" pages be hosted?
Apparently not with glibc, which favors <em>info</em>
pages (and it's worth noting that the <em>man-pages</em>
project often does a better job of documenting
the glibc interfaces).
Splitting the manual pages into two separate packages is
a significant piece of work. It's not always obvious which
package a particular page would belong to. Many pages
contain content that would relate to both packages.
(Do we split those pages into separate pages in the
two packages?
That's a big task.)
From a maintenance point of view,
maintaining two separate (but at times quite closely related)
man page packages would be a little less comfortable
than a single unified package.
And there are some other points, which, while not exactly disadvantages,
should be kept in mind when considering any change away from
the approach currently employed in <em>man-pages</em>:
<em>man-pages</em> maintains historical information on interfaces.
That is, each man page documents not just the the latest kernel
(or glibc) implementation, but also changes in the interface over time.
Such information is of course important for userland programmers.
Sometimes, a man page relates to multiple underlying system calls.
For example, there have over time been many system calls that
correspond to the
<a href="">stat(2)</a>
manual page.
Other examples are the Section 2 pages for the sockets API and
the System V IPC APIs;
for both of those APIs, there are several Section 2 pages,
but (on most architectures), only one multiplexed system call
<a href="">ipc(2)</a>
<a href="">socketcall(2)</a>).
In my (mtk) opinion, the disadvantages outweigh the advantages.
Furthermore, making the necessary changes would entail significant
time, and it's unproven whether the claimed
benefits would be borne out in practice (the state of
much of the material in the kernel
<span class="pathname">Documentation</span> directory
does not give grounds for optimism).
But I'm open to hearing further ideas,
and don't discount the possibility of doing
something about this in the future.
Here's an alternative idea.
Employ a couple of patch tags in the style of
"<span class="const">Signed-off-by:</span>".
One of these could be (say)
"<span class="const">ABI-changes-noted-by:</span>", indicating
that someone has noted that this patch changes the API/ABI.
The other would be (say)
"<span class="const">ABI-changes-doc-acked-by:</span>",
an indication from the appropriate documentation maintainer
that the ABI changes have been documented in
<em>man-pages</em> (or elsewhere if appropriate);
details of the actual documentation could be included elsewhere
in the patch's log message.
<a name="new_markup"></a>
<h2>Design and adopt a new mark-up language (?)</h2>
Currently, the pages in <em>man-pages</em> are created with
using one of two macro packages:
<em>man</em>, or the BSD derived <em>mdoc</em>.
(The vast majority of pages in
employ the <em>man</em> macro package.)
Neither macro package is optimal, since they
don't encode sufficient semantic detail about the elements of a page.
(This is especially true of the <em>man</em> macro package.)
What is perhaps required is a new mark-up language (probably some form
of docbook) that:
is unintrusive: the raw page source should remain very readable
applies mark-up by function, not by effect
can be easily processed to generate the present <em>nroff</em> from it
can be easily processed to generate HTML from it
is simple to learn and use
And of course, the existing pages would need to be converted to
the new format.
Status: too big a job to seriously entertain at the moment.
(Since the kernel documentation's move to Sphinx,
that tool is the obvious choice to consider for this task.)
<a name="style_guide"></a>
<h2>Devise or adopt a style guide</h2>
Because the pages in
have been produced by many authors, there was much inconsistency
in spelling, layout, terminology, and so on.
During the course of the 2.xx and 3.xx releases there has been quite a lot
of work done to achieve greater consistency
(see for example the "Global changes" in releases
<a href="changelog.html#release_2.07">2.07</a>,
<a href="changelog.html#release_2.10">2.10</a>,
<a href="changelog.html#release_2.13">2.13</a>,
<a href="changelog.html#release_2.21">2.21</a>,
<a href="changelog.html#release_2.38">2.38</a>,
<a href="changelog.html#release_2.44">2.44</a>,
<a href="changelog.html#release_2.46">2.46</a>,
<a href="changelog.html#release_2.47">2.47</a>,
<a href="changelog.html#release_2.48">2.48</a>,
<a href="changelog.html#release_2.51">2.51</a>,
<a href="changelog.html#release_2.52">2.52</a>,
<a href="changelog.html#release_2.53">2.53</a>,
<a href="changelog.html#release_2.54">2.54</a>,
<a href="changelog.html#release_2.56">2.56</a>,
<a href="changelog.html#release_2.59">2.59</a>,
<a href="changelog.html#release_2.60">2.60</a>,
<a href="changelog.html#release_2.61">2.61</a>,
<a href="changelog.html#release_2.62">2.62</a>,
<a href="changelog.html#release_2.64">2.64</a>,
<a href="changelog.html#release_2.65">2.65</a>,
<a href="changelog.html#release_2.67">2.67</a>,
<a href="changelog.html#release_2.69">2.69</a>,
<a href="changelog.html#release_2.70">2.70</a>,
<a href="changelog.html#release_2.71">2.71</a>,
<a href="changelog.html#release_2.72">2.72</a>,
<a href="changelog.html#release_2.74">2.74</a>,
<a href="changelog.html#release_2.75">2.75</a>,
<a href="changelog.html#release_2.80">2.80</a>,
<a href="changelog.html#release_3.00">3.00</a>,
<a href="changelog.html#release_3.01">3.01</a>,
<a href="changelog.html#release_3.04">3.04</a>,
<a href="changelog.html#release_3.12">3.12</a>,
<a href="changelog.html#release_3.19">3.19</a>,
<a href="changelog.html#release_3.20">3.20</a>,
<a href="changelog.html#release_3.24">3.24</a>,
<a href="changelog.html#release_3.27">3.27</a>,
<a href="changelog.html#release_3.29">3.29</a>,
<a href="changelog.html#release_3.30">3.30</a>,
<a href="changelog.html#release_3.35">3.35</a>,
<a href="changelog.html#release_3.42">3.42</a>,
<a href="changelog.html#release_3.43">3.43</a>,
<a href="changelog.html#release_3.44">3.44</a>,
<a href="changelog.html#release_3.48">3.48</a>,
<a href="changelog.html#release_3.49">3.49</a>,
<a href="changelog.html#release_3.56">3.56</a>,
<a href="changelog.html#release_3.59">3.59</a>,
<a href="changelog.html#release_4.05">4.05</a>),
but there is still more work to be done.
To guide that work, as well as authors of future pages,
<em>man-pages</em> should have (i.e., probably adopt)
a style guide.
The open question is: what existing style guide is suitable?
(In the meantime,
<span class=manpage><a href="">man-pages(7)</a></span>
provides guidance on some points.)
<!-- SITETRACKING.linux_man-pages -->
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=5618989;
var sc_invisible=1;
var sc_partition=60;
var sc_click_stat=1;
var sc_security="4f8507d7";
<script type="text/javascript"
class="statcounter"><a title="customisable counter"
target="_blank"><img class="statcounter"
src="" alt="customisable
counter" ></a></div></noscript>
<!-- End of StatCounter Code -->