We (me, my publisher) are still trying to work out what to call my (lengthy) system programming book. On my other blog, I'm asking for opinions from potential readers. If you'd like to help me name my book, please have a read of that blog post and send me a vote!
Thursday, September 10, 2009
Sunday, September 6, 2009
System programming book now half-way through copyediting
My book on Lunux/Unix system programming is now more than half-way through copyediting, so I've posted the detailed table of contents of the first 33 chapters. (For an overview of the book, look here, and to see the brief table of contents--chapter names only--look here.)
We're still on schedule for the book to be published in the first half of 2010 (by No Starch Press). Ongoing progress towards publication is regularly updated at blog.man7.org.
Please keep telling people about the book and the blog!
Posted by
Michael Kerrisk
at
9:35 AM
0
comments
Monday, July 27, 2009
A different story: my book
For quite a long time now, I've been working on a book that covers much the same topic area as man-pages; that is, the Linux/Unix kernel-userland interface (system calls, /proc, and so on) and C library (glibc) functions.
The book is going to be comprehensive: it runs to around 1500 pages (exactly how long will depend on typesetting and page layout, which are just getting started), has 64 chapters, 116 diagrams, 85 tables, and around 250 example programs. It will be published in the first half of 2010 by No Starch Press. You can read about its ongoing progress towards publication in my other blog at blog.man7.org. To get an overview of what the book is about, read this post, and to see the table of contents of the book, read this post.
And of course, please tell people about the book!
Posted by
Michael Kerrisk
at
10:30 PM
1 comments
Saturday, July 25, 2009
man-pages-3.22 is released
After a long gap without a release, I've uploaded man-pages-3.22 into the release directory (or view the online pages). This release consists entirely of fixes to existing pages.
Posted by
Michael Kerrisk
at
8:38 PM
0
comments
Monday, April 20, 2009
man-pages-3.21 is released
A few days ago, I uploaded man-pages-3.21 into the release directory (or view the online pages). Notable changes in man-pages-3.21 are:
- A new pthread_setconcurrency(3) page documents pthread_setconcurrency() and pthread_getconcurrency().
- A new pthread_yield(3) page documents pthread_yield().
- The feature_test_macro(7) page adds information on the changes that glibc 2.10 makes
for alignment with POSIX.1-2008, and adds an example program that can be used to display the feature test macros that are implicitly defined by particular glibc versions and as a consequence of explicitly setting macros.

Posted by
Michael Kerrisk
at
8:01 PM
0
comments
Monday, March 30, 2009
man-pages-3.20 is released
I've uploaded man-pages-3.20 into the release directory (or view the online pages). Notable changes in man-pages-3.20 are:
- The addition of cpuid(4) and msr(4) device man pages (thanks to Andi Kleen)
- Numerous fixes to other pages.

Posted by
Michael Kerrisk
at
11:45 PM
1 comments
Wednesday, February 25, 2009
man-pages-3.19 is released
I've uploaded man-pages-3.19 into the release directory (or view the online pages). The most notable change in man-pages-3.19 is the addition of four pages describing the POSIX interval timers API: timer_create(2), timer_settime(2), timer_getoverrun(2), and timer_delete(2).
Posted by
Michael Kerrisk
at
3:17 AM
0
comments
Wednesday, February 11, 2009
man-pages-3.18 is released
I've uploaded man-pages-3.18 (my one hundredth release as maintainer!) into the release directory (or view the online pages). Notable changes in man-pages-3.18 are:
- 4 new pages describing character sets: armscii-8(7), iso_8859-11(7), iso_8859-4(7), and iso _8859-6(7). Thanks once again to Lefteris Dimitroulakis for contributing!
- A new pthread_kill(3) page documents pthread_kill().
- A new pthread_kill_other_threads_np(3) page documents pthread_kill_other_threads_np().
- A new pthread_sigmask(3) page documents pthread_sigmask().
- The clock_getres(2) page was moved from Section 3 to Section 2 (since the interfaces it describes really are system calls, not library functions), and adds a description of CLOCK_MONOTONIC_RAW, new in 2.6.28.
- Some bugs were fixed in select_tut(2) and many changes and tidy-ups were made to the text.
Posted by
Michael Kerrisk
at
1:47 AM
2
comments
Friday, January 23, 2009
linux.conf.au 2010 in Wellington
For it's 11th time out, linux.conf.au returns to New Zealand again in 2010. (YAY!!) Congratulations to the successful bidders from Wellington! The conference will run from Monday 18 January to Saturday 23 January. The organizers' website is http://www.penguinsvisiting.org.nz/.
Posted by
Michael Kerrisk
at
9:34 PM
0
comments
Tuesday, January 20, 2009
Speaking at LCA 2009
Late notice (but that's all I got)... I'll be speaking at LCA 2009 in Hobart, Australia, on 22 Jan, considering what happens when kernel and userland don't talk.
Update: my presentation slides can be found here.
Posted by
Michael Kerrisk
at
4:52 AM
0
comments
Monday, January 19, 2009
man-pages-3.17 is released
I've uploaded man-pages-3.17 into the release directory (or view the online pages). Notable changes in man-pages-3.17 are:
- A new endian(3) page documents functions added in glibc 2.9 that convert between host byte order and little- and big-endian order: htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), and le64toh().
- A new getifaddrs(3) page documents the getifaddrs() and freeifaddrs() library functions.
- 8 new pages describe various character sets: cp1251(7), iso-8859-10(7), iso_8859-13(7), iso_8859-14(7), iso_8859-3(7), iso_8859-5(7), iso_8859-8(7), and koi8-u(7). Thanks to Lefteris Dimitroulakis for contributing these!
- And various smaller changes in many other pages.
Tasmanian Devil
Posted by
Michael Kerrisk
at
6:32 AM
0
comments
Monday, January 12, 2009
man-pages-3.16 is released
I've uploaded man-pages-3.16 into the release directory (or view the online pages). Notable changes in man-pages-3.16 are:
- A new pthread_getcpuclockid(3) page documents pthread_getcpuclockid().
- A new libc(7) page provides an overview of the standard C library implementations on Linux.
- A new rtld-audit(7) page provides an overview of the dynamic linker auditing API (modeled on the Solaris API): the functions la_version(), la_objsearch(), la_activity(), la_objopen(), la_objclose(), la_preinit(), la_symbind(), la_pltenter(), and la_pltexit().
- The ld.so(8) page adds documentation of the LD_AUDIT and LD_POINTER_GUARD environment variables.
Posted by
Michael Kerrisk
at
11:05 PM
1 comments
Tuesday, January 6, 2009
See you at LCA 2009
It's too much fun to miss, so I finally made the booking... I'm going to LCA 2009 (19-24 Jan), in Hobart, Australia!
Posted by
Michael Kerrisk
at
6:56 PM
0
comments
Friday, December 5, 2008
man-pages-3.15 is released
I've uploaded man-pages-3.15 into the release directory (or view the online pages). Notable changes in man-pages-3.15 are:
- A new makedev(3) page documents the makedev(), major(), and minor() macros used to manipulate device IDs.
- A new pthread_cleanup_push_defer_np(3) page documents pthread_cleanup_push_defer_np() and pthread_cleanup_pop_restore_np().
- The accept(2) page adds documentation of the new accept4() system call (coming in Linux 2.6.28)
- The fmemopen(3) page adds a description of open_wmemstream(3).
- The tcp(7) page adds a description of the use of the MSG_TRUNC flag for retrieving data from a TCP socket.
- Many updates to the atexit(3) page.
- Updates to many other pages
Posted by
Michael Kerrisk
at
11:30 PM
0
comments
Wednesday, December 3, 2008
Linux Foundation fellowship, 6 months in
Not quite 6 months since I started the Linux Foundation fellowship, it's time to analyze and reflect on what has (or hasn't) been accomplished.
Some statistics
I took over maintainership of man-pages at the start of November 2004, with the first release being man-pages-2.00. From then until the fellowship started in the middle of May this year (a period of 185 weeks), I probably spent between 0 and 2.5 days a week on man-pages, most of it done as private, volunteer work. (For a period of around a year, I probably managed up about half day a week as part of my day job; thanks Google!) I'd guess it was a bit better than day a week on average (let's say 1.25 days), and we could roughly estimate that as the equivalent of 45 working weeks.
Since the fellowship started, I've worked for about 25 weeks on man-pages; that is, somewhat more than half of the estimated time that I spent on man-pages in the preceding 3.5 years. The first release during my tenure of the fellowship was man-pages-2.80, and since then there have been 15 more (man-pages-3.00 through man-pages-3.14).
What I'm expecting is that the limiting factor in the progress of man-pages is the availability of my time. If I get to work at around four times the rate I did before, then we should see a corresponding increase in the progress of man-pages. Very roughly, in the last 6 months, progress should have been somewhat more than 50% of what it was in the previous 3.5 years.So here's a first comparison:
| Period | Number of releases |
| Pre-fellowship | 80 |
| During fellowship | 16 |
Well, that doesn't look so good. But there's no question that there's more work going on for each release nowadays. Here's another simple statistic, derived from the commit logs:
| Period | Number of commits |
| Pre-fellowship | 3610 |
| During fellowship | 1852 |
Commits in the last 6 months were nearly 50% of the total during the previous 3.5 years. That seems roughly in line with expectations, and supports the theory that there's a lot more work going into each man-pages release nowadays. Of course, commits vary a lot in size, ranging from a spelling fix, to a complete new page, and going through to some of the enormous global formatting fixes that took place in the man-pages-2.* series, so this is a very rough measure. (One of the commits cleaning up source files layout in man-pages-2.47 had a diff size of more than 60000 lines(!). There were many other large formatting commits in the man-pages-2.*, which is why trying to compare the volume of diffs before and during the fellowship doesn't produce a useful metric.)Another rough measure is how many man pages were added to the set over time:
| Period | Number of new pages added |
| Pre-fellowship | 93 |
| During fellowship | 56 |
Again, that's roughly in line with expectations, with the number of pages added during the fellowship being somewhat more than 50% of the previous period.
But where did the new pages come from?
| Period | By mtk | By others | By mtk + other(s) | Imports |
| Pre-fellowship | 52 | 22 | 13 | 6 |
| During fellowship | 50 | 4 | 1 | 1 |
"mtk" is me. "Other(s)" is someone else. "Imports" are pages under a free license that I scooped up from some other source (e.g., found on the net, in a distro, or in BSD).
On the negative side, I wrote the vast majority of new pages that have been added so far during the fellowship. On the positive side, Paul Jackson contributed the single biggest page, cpuset(7), which became the fourth largest page in man-pages. (Also worth noting: in the man-pages-2.* releases, a total of 28 pages were deleted, mainly obsolete pages in Section 1.) In fact, I had hoped to be able to get even more pages written, but other tasks, such as testing, API review, and kernel patches have also taken up a significant fraction of my time during the fellowship. When considered as a (calendar) monthly rate, contributions of new pages by others are, unfortunately, essentially unchanged since before the fellowship.
So, progress towards improving contributions by others, at least in terms of new pages, has not been good. However, my gut feeling has been that more people are actually contributing to man-pages than before: the fact that there is a full-time maintainer means people are rather more likely to send bug reports, suggestions, and patches for existing pages. Here's a statistic that bears it out:
| Period | Average contributors/week |
| Pre-fellowship | 2.8 |
| During fellowship | 5.9 |
This was calculated by summing the number of contributors in each of the change logs in all of the releases over the two periods and then dividing by the number of calendar weeks in each period (185 and 28 respectively). 5.9 contributors per week is still much lower than I'd like, but my feeling is that the rate has increased steadily over the time of the fellowship, so that the current rate is already higher than 5.9, and set to increase further. (Another factor that may also have helped boost the number of reports is that in December 2007 I started adding a COLOPHON to each man page describing how to report bugs, and this change would have filtered into distribution CDs a few months later.)
Timeliness of documentation
Things have defintely got better during the fellowship. Most additions and changes to the kernel-userland interface during the time of the fellowship have been documented in man-pages pretty much as they occur. (This contrasts with earlier times, where interface changes have sometimes been followed only months (or in extreme cases years) later by man page updates.) Most notably, Ulrich Drepper's new system calls in Linux 2.6.27 saw man pages go out a few days after the release of that kernel.
Testing and bug reporting
I've done a fair bit of this over the course of the fellowship. Most new system calls and system call extensions got tested by me before they hit mainline. This uncovered a few bugs which were then fixed. The biggest single piece of work here was for the utimensat(2) system call, producing a test suite (later integrated into LTP), along with patches that fixed the 5 or so bugs in the interface (details here).
Many existing glibc functions also got tested as I updated the man pages for them. Most notably, updates to the man pages produced about 35 bug reports related to error reporting by the math functions. The addition of man pages for various pthreads functions has also been accompanied by a lot of testing, and a half dozen or so bug reports.
API design review
Most new system calls and system call extensions got reviewed before going into mainline. (My record on other kernel interfaces, such as /proc files, was a more spotty though.) Among other things, this resulted in a redesign of the proposed extension of the accept() system call (originally proposed as paccept(), with a signal set argument whose necessity was dubious, later revised to accept4(), which should appear in kernel 2.6.28).
Miscellaneous
- man-pages moved from a private Subversion repository to a public git repository on kernel.org.
- In general, I'm blogging a bit more actively nowadays, and in addition to posts summarizing releases, there have been longer posts on topics such as: problems with kernel-userland interface design and implementation; the state of error reporting for glibc's math functions; and a few articles describing or summarizing Linux kernel-userland interface changes.
- After my presentation at LPC for the kernel-userland interface track, I finally got round to an idea I'd been considering for a while: creating the linux-api mailing list. The rationale for the list is that all patches that cause API/ABI changes should be CCed to the list, so that the many parties who are interested in API/ABI changes (e.g., man-pages, LSB, libc developers, kernel developers, testers such as the folk at LTP, and of course userland developers) can get an idea of what's going on. Most people still don't read Documentation/SubmitChecklist, to know they should be using this list, so I try to regularly chase people to use it (and some others also help in that regard), and by now at least some people do so without prompting.
- I've helped out LSB on a number of occasions, filing a few bug reports against the spec, but also helping out by writing man pages for functions that they wanted to specify that were currently undocumented (see, e.g., here and here). This resulted in new man pages such as getprotoent_r(3), getservent_r(3), getnetent_r(3), and pthread_getattr_np().
- I continue to respond to many bug reports in the manpages and manpages-dev components of Debian's bug tracking system. This has mutual benefits: on the one hand, although I'm not actually a member of Debian, I'm by far the most active fixer of their bug reports; on the other hand, most Debian bug reports for man pages really apply to the upstream pages (I ignore the ones that don't), and so the reports provide a valuable source of pointers to things that need fixing in man-pages. A big thank you to Debian users, who produce far more (and more useful) man-pages bug reports than all of the other distributions put together!
- Working on man-pages led me to find various deficiencies in POSIX.1 specifications, resulting in around a half dozen bug reports to the Austin group.

Posted by
Michael Kerrisk
at
11:50 AM
0
comments

