Re: [linux] Always ignore restart/cancellation signals

Daniel Jacobowitz
2005-12-09T14:34:56Z

On Fri, Dec 09, 2005 at 01:47:50PM +0200, Eli Zaretskii wrote:
> There's no need to, IMHO. I think Jim was wrong: symbols starting
> with __ are indeed reserved for the implementation, but the meaning of
> that reservation is that user code should not _define_ such symbols,
> not that it must not use them. In effect, this rule sets up a
> namespace that the library implementation can use without risking that
> it steps on the feet of user code. But if we don't define any symbols
> that begin with __, we are safe accessing them, I think.

OK.

> I have no idea why the above comment from bits/signum.h was written.
> I think it is wrong and the glibc maintainers should be asked to
> either remove it or explain why they think these symbols should not be
> used at user level.

The comment is actually correct - for the vast majority of users of the
header. I've long ago accepted that it's GDB's business to poke around
in the implementation :-)

The problem is that an application may want to register handlers for "a
few" realtime signals. It seems common to count up from SIGRTMIN, so
SIGRTMIN is made a runtime constant that skips those signals belonging
to the implementation. If you use the constant in the header for
anything, the implementation reserves the right to kick you when you're
down.

--
Daniel Jacobowitz
CodeSourcery, LLC