man7.org > tlpi > API changes

Linux and glibc API changes

As The Linux Programming Interface went to press in August 2010, it was up to date with the then current versions of the Linux kernel (2.6.35) and glibc (2.12). Because the developers of both the Linux kernel and glibc are committed to maintaining ABI compatibility, virtually all of the details provided in TLPI should remain accurate in the future. However, new features are added to the kernel and glibc with each release. As each new release of the Linux kernel and glibc occurs, this page will attempt to note new interface features that are relevant to the subject area of the book.


Linux kernel API changes

Linux 3.3 (Not yet released)

Changes include the following:

Linux 3.2 (4 Jan 2012)

Changes include the following:

Linux 3.1 (24 Oct 2011)

Changes include the following:

Linux 3.0 (?) (22 Jul 2011)

Changes include the following:

Linux 2.6.39 (19 May 2011)

Changes include the following:

Linux 2.6.38 (15 Mar 2011)

Changes include the following:

Linux 2.6.37 (5 Jan 2011)

fanotify_init() and fanotify_mark() system calls

The fanotify_init() and fanotify_mark() system calls are designed for use in virus-scanning tools, but may also serve other more general uses.

These two system calls provide functionality that is in some ways similar to inotify(7). Note however that the fanotify interface is not a superset of inotify. (The existence of two APIs with heavily overlapping functionality, rather than a new API that is a superset of the earlier API, is unfortunate.)

These two system calls were added in Linux 2.6.36, but disabled while concerns about the API were resolved. In Linux 2.6.37, the system calls have been enabled.

As yet, there are no manual pages for fanotify; in the meantime, see the KernelNewbies 2.3.36 changes page and this LWN.net article for further information.

Linux 2.6.36 (20 Oct 2010)

prlimit() system call

The prlimit() system call is an enhancement of setrlimit() and getrlimit(). It allows the caller to both set and retrieve its own resource limits (including retrieving the old limit at the same time as a new limit is set), and (with suitable permissions) perform the same task for other processes.

This system call does not suffer this kernel bug, which affects getrlimit()/setrlimit(). (See pages 759 and 760 of the book.) Indeed, it could eventually be used to provide glibc wrappers for setrlimit() and getrlimit() that work around the kernel bug.

I've added documentation of this system call to the getrlimit(2) man page, starting with man-pages-3.31.

inotify IN_EXCL_UNLINK flag

The inotify IN_EXCL_UNLINK flag prevents children of a watched directory from generating events for a directory after they have been unlinked from that directory.

I've added documentation of this flag to the inotify(7) man page, starting with man-pages-3.31.

glibc API changes

glibc 2.16 (not yet released)

The glibc header files now handle the _ISOC11_SOURCE feature test macro, as a mechanism for exposing declarations conforming to the C11 standard.

glibc 2.15 (tagged 23 Dec 2011)

A new scandirat() function, which is to scandir() as openat(2) is to open().

glibc 2.14 (tagged 31 May 2011)

No API changes (other than simple wrappers for recently added Linux system calls).

glibc 2.13 (tagged 17 Jan 2011)

No API changes (other than simple wrappers for recently added Linux system calls).


(C) 2012 Michael Kerrisk,   mtk AT man7.org