C++ Logo

sg12

Advanced search

Re: [ub] Draft 1 of Stackable, Thread Local, Signal Guards

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Sun, 2 Jun 2019 21:00:15 +0100
>> If not, and particularly if a majority on SG12 agrees me with that
>> signal() is almost useless and almost no newly written production code
>> written in the past 20 years has used it, would SG12 prefer to see a
>> proposed wholesale replacement for signal(), which we send to deprecation?
>
> Sounds plausible. Do we have any code search results about the use of signal()?

Sigh. I knew somebody was going to ask that.

It's a great question, but since Google Code Search shut down, I am
unaware of any free of cost search engine which can case sensitively
match "[^a-z0-9_:]signal\(", and which has a non-toy corpus.

As an illustration of how impossible current search tooling is:

Probably accurate enough 554K results
https://github.com/search?q=extension%3Ac+extension%3Acpp+%22sigaction+sig%22

Confounded by Qt 621k results
https://github.com/search?q=extension%3Ac+extension%3Acpp+%22signal+sig%22


I can't get the regex search on http://opensearch.krugle.org to work.

https://searchcode.com/ no longer appears to match punctuation nor case.

Chromium code search works well:
https://cs.chromium.org/search/?q=%5B%5Ea-z0-9_:%5Dsignal%5C(+case:yes&type=cs
shows that the only use of standard signal() is for a unit test on
non-POSIX platforms. sigaction() is used throughout:
https://cs.chromium.org/search/?q=%5B%5Ea-z0-9_:%5Dsigaction%5C(+case:yes&type=cs.
But that's one, modern, codebase. Hardly representative.


If anybody reading can help with giving a better answer to Ville's
question, it would be very useful.

Niall

Received on 2019-06-02 22:00:23