From 9fe77cc9b6ef3ff185c8383b4cb5767319d204ce Mon Sep 17 00:00:00 2001 From: li_jianqiu <295949552@qq.com> Date: Mon, 28 Mar 2022 18:55:39 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2056422b7=20from=20https://gitee.com/li?= =?UTF-8?q?=5Fjianqiu/openGauss-server/pulls/1634=20=E3=80=90bugfix?= =?UTF-8?q?=E3=80=91=E4=BB=8E=E5=BA=94=E7=94=A8=E7=AB=AF=E7=9C=8B=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=95=B0=E5=B9=B6=E6=B2=A1=E6=9C=89=E8=BE=BE=E5=88=B0?= =?UTF-8?q?1W=E6=9C=80=E5=A4=A7=E8=BF=9E=E6=8E=A5=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E6=95=B0=E6=8D=AE=E5=BA=93=E5=A0=86=E6=A0=88?= =?UTF-8?q?=E4=B8=AD=E5=AD=98=E5=9C=A813800=E4=B8=AA=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=EF=BC=8C=E4=B9=9F=E4=B8=8D=E8=83=BD=E5=88=9B=E5=BB=BA=E6=96=B0?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=BA=93hang?= =?UTF-8?q?=E4=BD=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/cbb/communication/libcomm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/cbb/communication/libcomm.cpp b/src/gausskernel/cbb/communication/libcomm.cpp index 139d58703..e1aff3ea5 100755 --- a/src/gausskernel/cbb/communication/libcomm.cpp +++ b/src/gausskernel/cbb/communication/libcomm.cpp @@ -2306,7 +2306,11 @@ bool gs_stop_query(gsocket* gsock, uint32 remote_pid) /* get the error information of communication layer */ const char* gs_comm_strerror() { - return mc_strerror(errno); + bool savedVal = t_thrd.int_cxt.ImmediateInterruptOK; + t_thrd.int_cxt.ImmediateInterruptOK = false; + const char *errMsg = mc_strerror(errno); + t_thrd.int_cxt.ImmediateInterruptOK = savedVal; + return errMsg; } /* get communication layer stream status at receiver end as a tuple for pg_comm_stream_status */