Skip to content

Commit

Permalink
Do not log within signal handler as it is not safe (#2843)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeking3 authored Feb 6, 2024
1 parent 5861d3d commit 9e1eb51
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/aws-cpp-sdk-core/source/http/HttpClientFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,8 @@ namespace Aws
static const char* HTTP_CLIENT_FACTORY_ALLOCATION_TAG = "HttpClientFactory";

#if ENABLE_CURL_CLIENT && !defined(_WIN32)
static void LogAndSwallowHandler(int signal)
static void LogAndSwallowHandler(int)
{
switch(signal)
{
case SIGPIPE:
AWS_LOGSTREAM_ERROR(HTTP_CLIENT_FACTORY_ALLOCATION_TAG, "Received a SIGPIPE error");
break;
default:
AWS_LOGSTREAM_ERROR(HTTP_CLIENT_FACTORY_ALLOCATION_TAG, "Unhandled system SIGNAL error" << signal);
}
}
#endif

Expand Down

0 comments on commit 9e1eb51

Please sign in to comment.