This is the mail archive of the
mailing list for the glibc project.
Re: Official Linux system wrapper library?
- From: Florian Weimer <fweimer at redhat dot com>
- To: Daniel Colascione <dancol at google dot com>
- Cc: "Michael Kerrisk \(man-pages\)" <mtk dot manpages at gmail dot com>, linux-kernel <linux-kernel at vger dot kernel dot org>, Joel Fernandes <joelaf at google dot com>, Linux API <linux-api at vger dot kernel dot org>, Willy Tarreau <w at 1wt dot eu>, Vlastimil Babka <vbabka at suse dot cz>, "Carlos O'Donell" <carlos at redhat dot com>, "libc-alpha\@sourceware.org" <libc-alpha at sourceware dot org>
- Date: Mon, 12 Nov 2018 09:11:10 +0100
- Subject: Re: Official Linux system wrapper library?
- References: <CAKOZuesB4R=dCz4merWQN0FSCGrXmOgUUr4ienSbStBJguNv8g@mail.gmail.com> <email@example.com> <firstname.lastname@example.org> <CAKOZues5SEESpJU=6MDTrPXTA1KTZFGNQE4Lw4t0fO-WBTU62w@mail.gmail.com>
* Daniel Colascione:
> If the kernel provides a system call, libc should provide a C wrapper
> for it, even if in the opinion of the libc maintainers, that system
> call is flawed.
It's not that simple, I think. What about bdflush? socketcall?
getxpid? osf_gettimeofday? set_robust_list? There are quite a few
irregularities, and some editorial discretion appears to be unavoidable.
Even if we were to provide perfectly consistent system call wrappers
under separate names, we'd still expose different calling conventions
for things like off_t to applications, which would make using some of
the system calls quite difficult and surprisingly non-portable.