Memset sigaction before using it (#24933)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2023-06-16 14:08:40 +08:00 committed by GitHub
parent ce5cb3c0c5
commit cbfbc4e63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,7 @@ MinioChunkManager::InitSDKAPI(RemoteStorageType type) {
if (initCount == 0) {
// sdk_options_.httpOptions.installSigPipeHandler = true;
struct sigaction psa;
memset(&psa, 0, sizeof psa);
psa.sa_handler = SwallowHandler;
psa.sa_flags = psa.sa_flags | SA_ONSTACK;
sigaction(SIGPIPE, &psa, 0);