You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by se...@apache.org on 2023/07/10 05:05:52 UTC

[brpc] branch master updated: fix ignore SIGPIPE signal concurrent issue with other library (#2301)

This is an automated email from the ASF dual-hosted git repository.

serverglen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new c6d51ee1 fix ignore SIGPIPE signal concurrent issue with other library (#2301)
c6d51ee1 is described below

commit c6d51ee109d9dc912895d94074637555cb0db15c
Author: lrita <lr...@163.com>
AuthorDate: Mon Jul 10 13:05:47 2023 +0800

    fix ignore SIGPIPE signal concurrent issue with other library (#2301)
---
 src/brpc/global.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/brpc/global.cpp b/src/brpc/global.cpp
index 30c2f1a3..fbd669e7 100644
--- a/src/brpc/global.cpp
+++ b/src/brpc/global.cpp
@@ -323,7 +323,7 @@ static void GlobalInitializeOrDieImpl() {
     struct sigaction oldact;
     if (sigaction(SIGPIPE, NULL, &oldact) != 0 ||
             (oldact.sa_handler == NULL && oldact.sa_sigaction == NULL)) {
-        CHECK(NULL == signal(SIGPIPE, SIG_IGN));
+        CHECK(SIG_ERR != signal(SIGPIPE, SIG_IGN));
     }
 
     // Make GOOGLE_LOG print to comlog device


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org