<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ccache.git/src/SignalHandler.cpp, branch master</title>
<subtitle>github.com: ccache/ccache
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/'/>
<entry>
<title>fix: Fix rare crash in signal handler</title>
<updated>2023-02-01T20:33:09+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2023-02-01T20:04:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=d75a0847ea1f4608942ce8a06628a9a85a830f45'/>
<id>d75a0847ea1f4608942ce8a06628a9a85a830f45</id>
<content type='text'>
If the process is signaled after SignalHandler::~SignalHandler has run
then this assert will trigger:

    ccache: SignalHandler.cpp:87: static void SignalHandler::on_signal(int): failed assertion: g_the_signal_handler

Fix this by deregistering the signal handler function before destructing
the SignalHandler object.

Fixes #1246.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the process is signaled after SignalHandler::~SignalHandler has run
then this assert will trigger:

    ccache: SignalHandler.cpp:87: static void SignalHandler::on_signal(int): failed assertion: g_the_signal_handler

Fix this by deregistering the signal handler function before destructing
the SignalHandler object.

Fixes #1246.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(redis-storage): Ignore SIGPIPE</title>
<updated>2021-09-09T19:34:53+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2021-09-09T18:55:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=b2a88e7b885cd43882b525fdaf2b57dd931a0427'/>
<id>b2a88e7b885cd43882b525fdaf2b57dd931a0427</id>
<content type='text'>
libhiredis doesn’t pass MSG_NOSIGNAL to send to ccache can die from
SIGPIPE. Disable SIGPIPE so that the socket code receives EPIPE
correctly.

This should also fix a similar problem with the HTTP storage backend.

Fixes #931.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libhiredis doesn’t pass MSG_NOSIGNAL to send to ccache can die from
SIGPIPE. Disable SIGPIPE so that the socket code receives EPIPE
correctly.

This should also fix a similar problem with the HTTP storage backend.

Fixes #931.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove system.hpp, including what’s needed instead</title>
<updated>2021-07-07T07:13:05+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2021-07-06T19:19:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=ca9ec9cfa8af99eb1e5c39c9dffdc1c611ed235c'/>
<id>ca9ec9cfa8af99eb1e5c39c9dffdc1c611ed235c</id>
<content type='text'>
This is the next step after a57f70eda32e99221de56f5499079b4f00dc2bc5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the next step after a57f70eda32e99221de56f5499079b4f00dc2bc5.
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress Clang-Tidy warning about including signal.h</title>
<updated>2021-01-06T20:29:37+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2021-01-06T20:29:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=f147414f66447d1ae06f3932ed0aedf571c307d3'/>
<id>f147414f66447d1ae06f3932ed0aedf571c307d3</id>
<content type='text'>
sigaddset and similar functions are specified by POSIX to be in signal.h
and the C++ csignal header only contains a subset of the signal.h
declarations.

Related to PR #758.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sigaddset and similar functions are specified by POSIX to be in signal.h
and the C++ csignal header only contains a subset of the signal.h
declarations.

Related to PR #758.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve header inclusion for SignalHandler</title>
<updated>2021-01-06T19:25:06+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2021-01-06T19:23:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=9bc012166d180c4ae0c3042e83ab34b4b21e8926'/>
<id>9bc012166d180c4ae0c3042e83ab34b4b21e8926</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ASSERT and DEBUG_ASSERT macros</title>
<updated>2020-09-21T18:43:15+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2020-09-18T06:36:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=706f74430064463dcbea8104be2eed93c563e0fc'/>
<id>706f74430064463dcbea8104be2eed93c563e0fc</id>
<content type='text'>
CMake always defines NDEBUG in release builds, so assertions are only
enabled in debug builds. Assertions were however always enabled before
switching to CMake. I prefer keeping assertions enabled in release
builds as well unless they are part of a tight loop.

Fix this by introducing two custom assertion macors:

- ASSERT(condition): Like assert(condition) but always enabled.
- DEBUG_ASSERT(condition): Like assert(condition), i.e. only enabled in
  debug builds.

All usage of assert(condition) is converted to ASSERT(condition) since
none of the assertions are made in performance-critical code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CMake always defines NDEBUG in release builds, so assertions are only
enabled in debug builds. Assertions were however always enabled before
switching to CMake. I prefer keeping assertions enabled in release
builds as well unless they are part of a tight loop.

Fix this by introducing two custom assertion macors:

- ASSERT(condition): Like assert(condition) but always enabled.
- DEBUG_ASSERT(condition): Like assert(condition), i.e. only enabled in
  debug builds.

All usage of assert(condition) is converted to ASSERT(condition) since
none of the assertions are made in performance-critical code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor signal handling and process exit code</title>
<updated>2020-05-20T18:07:12+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2020-05-18T06:26:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=91aa70754c3816537b080fef1c6630313b400721'/>
<id>91aa70754c3816537b080fef1c6630313b400721</id>
<content type='text'>
* Added a SignalHandler class which encapsulates parts related to signal
  handling.
* Moved data referenced by the exit functions to Context (compiler PID,
  pending temporary files and pending debug log files).
* Let the Context destructor do what the exitfn functionality used to
  do.
* Removed the now superfluous exitfn functionality.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Added a SignalHandler class which encapsulates parts related to signal
  handling.
* Moved data referenced by the exit functions to Context (compiler PID,
  pending temporary files and pending debug log files).
* Let the Context destructor do what the exitfn functionality used to
  do.
* Removed the now superfluous exitfn functionality.
</pre>
</div>
</content>
</entry>
</feed>
