[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811122236240.18130@digraph.polyomino.org.uk>
Date: Mon, 12 Nov 2018 22:51:03 +0000
From: Joseph Myers <joseph@...esourcery.com>
To: Daniel Colascione <dancol@...gle.com>
CC: Florian Weimer <fweimer@...hat.com>,
Zack Weinberg <zackw@...ix.com>,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Joel Fernandes <joelaf@...gle.com>,
Linux API <linux-api@...r.kernel.org>,
Willy Tarreau <w@....eu>, Vlastimil Babka <vbabka@...e.cz>,
Carlos O'Donell <carlos@...hat.com>,
GNU C Library <libc-alpha@...rceware.org>
Subject: Re: Official Linux system wrapper library?
On Mon, 12 Nov 2018, Daniel Colascione wrote:
> The two features *are* unrelated. The design I've proposed works
> equally well for synchronous and asynchronous signals, and limiting it
Whatever the design, I see no obvious reason why a kernel-provided
library, with all the problems that entails, should need to be involved,
rather than putting new APIs either in libc or in a completely separate
libsignal for libraries wanting to use such a system for cooperative
signal use.
(I can imagine *other* parts of the toolchain being involved, if e.g. you
want to have a good way of checking "is the address of the instruction
causing this signal in this library?" that works with static as well as
dynamic linking - for dynamic linking, I expect something could be done
using libc_nonshared and __dso_handle to identify code in the library
calling some registering function. And indeed there might also be new
kernel interfaces that help improve signal handling.)
In the absence of consensus for adding such a new API for signals to
glibc, it's unlikely one would get consensus for glibc to depend on some
other library providing such an API either. But you can always write a
library (which I think would most naturally be a completely separate
libsignal, not part of the kernel source tree) and seek to persuade
libraries they should be using it rather than interfering with global
state by registering normal signal handlers directly.
--
Joseph S. Myers
joseph@...esourcery.com
Powered by blists - more mailing lists